]> sourceware.org Git - lvm2.git/commitdiff
Non-functional change - refactor vg_add_snapshot fid parameter.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Oct 2007 18:51:21 +0000 (18:51 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Oct 2007 18:51:21 +0000 (18:51 +0000)
lib/format1/import-export.c
lib/metadata/metadata-exported.h
lib/metadata/snapshot_manip.c
lib/snapshot/snapshot.c
tools/lvconvert.c
tools/lvcreate.c

index 0966f11c27f6ba2a9da1c7ee16f5c7648f7f136b..791a5cd3fef334f14825bd723c96ff0b315d6b9a 100644 (file)
@@ -644,7 +644,7 @@ int import_snapshots(struct dm_pool *mem __attribute((unused)), struct volume_gr
                                continue;
 
                        /* insert the snapshot */
-                       if (!vg_add_snapshot(vg->fid, NULL, org, cow, NULL,
+                       if (!vg_add_snapshot(vg, NULL, org, cow, NULL,
                                             org->le_count, 
                                             lvd->lv_chunk_size)) {
                                log_err("Couldn't add snapshot.");
index 3c1eb660495d17adda613e32f49d8c7e0d5612de..70d42ee6a353c48e186fb1a6a9d702f51f89f9a3 100644 (file)
@@ -412,7 +412,7 @@ struct lv_segment *find_cow(const struct logical_volume *lv);
 /* Given a cow LV, return its origin */
 struct logical_volume *origin_from_cow(const struct logical_volume *lv);
 
-int vg_add_snapshot(struct format_instance *fid, const char *name,
+int vg_add_snapshot(struct volume_group *vg, const char *name,
                    struct logical_volume *origin, struct logical_volume *cow,
                    union lvid *lvid, uint32_t extent_count,
                    uint32_t chunk_size);
index 7edceee6ebb69d8a2c14f805fc62a60c14f878b6..4892334b769a6d00c4c47e8ffad8807e6f3e115b 100644 (file)
@@ -48,11 +48,12 @@ struct logical_volume *origin_from_cow(const struct logical_volume *lv)
        return lv->snapshot->origin;
 }
 
-int vg_add_snapshot(struct format_instance *fid, const char *name,
+int vg_add_snapshot(struct volume_group *vg, const char *name,
                    struct logical_volume *origin,
                    struct logical_volume *cow, union lvid *lvid,
                    uint32_t extent_count, uint32_t chunk_size)
 {
+       struct format_instance *fid = vg->fid;
        struct logical_volume *snap;
        struct lv_segment *seg;
 
index 97f0ce8c1ca0eb6f87915f0b49ab805cba887d2c..62d2b093044d578993aa41f16de3b5acb7fd9b65 100644 (file)
@@ -69,7 +69,7 @@ static int _snap_text_import(struct lv_segment *seg, const struct config_node *s
                return 0;
        }
 
-       if (!vg_add_snapshot(seg->lv->vg->fid, seg->lv->name, org, cow,
+       if (!vg_add_snapshot(seg->lv->vg, seg->lv->name, org, cow,
                             &seg->lv->lvid, seg->len, chunk_size)) {
                stack;
                return 0;
index 19ea078cea05c97192d14894117d171ff491233a..2f3ce1058da7445be64f3ce6efe4a1e44428ef19 100644 (file)
@@ -515,7 +515,7 @@ static int lvconvert_snapshot(struct cmd_context *cmd,
                return 0;
        }
 
-       if (!vg_add_snapshot(lv->vg->fid, NULL, org, lv, NULL, org->le_count,
+       if (!vg_add_snapshot(lv->vg, NULL, org, lv, NULL, org->le_count,
                             lp->chunk_size)) {
                log_error("Couldn't create snapshot.");
                return 0;
index 6f892549205615159db78ff4783028fff1eb0118..4120d42b3d24ac8e2a1f6710dbe787b559d77bf2 100644 (file)
@@ -853,7 +853,7 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
 
                /* cow LV remains active and becomes snapshot LV */
 
-               if (!vg_add_snapshot(vg->fid, NULL, org, lv, NULL,
+               if (!vg_add_snapshot(vg, NULL, org, lv, NULL,
                                     org->le_count, lp->chunk_size)) {
                        log_err("Couldn't create snapshot.");
                        return 0;
This page took 0.047912 seconds and 5 git commands to generate.