]> sourceware.org Git - lvm2.git/commitdiff
thin - hide unimplemented dso fn; remove duplicate origin_lv field; add
authorAlasdair Kergon <agk@redhat.com>
Fri, 26 Aug 2011 17:40:53 +0000 (17:40 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 26 Aug 2011 17:40:53 +0000 (17:40 +0000)
some lvcreate struct parms

lib/metadata/metadata-exported.h
lib/thin/thin.c

index bbe9bf560237cf11bf232cdbd1079ccbacc6c40f..7d615d0b1d40a644ae65b9ba76eef955750887ab 100644 (file)
@@ -305,7 +305,7 @@ struct lv_segment {
        uint32_t area_count;
        uint32_t area_len;
        uint32_t chunk_size;    /* For snapshots - in sectors */
-       struct logical_volume *origin;
+       struct logical_volume *origin;  /* snap and thin */
        struct logical_volume *cow;
        struct dm_list origin_list;
        uint32_t region_size;   /* For mirrors, replicators - in sectors */
@@ -323,7 +323,6 @@ struct lv_segment {
        uint64_t transaction_id;                /* For thin_pool */
        uint32_t zero_new_blocks;               /* For thin_pool */
        struct logical_volume *thin_pool_lv;    /* For thin */
-       struct logical_volume *origin_lv;       /* For thin */
        uint64_t device_id;                     /* For thin */
 
        struct logical_volume *replicator;/* For replicator-devs - link to replicator LV */
@@ -547,6 +546,8 @@ typedef enum {
 struct lvcreate_params {
        /* flags */
        int snapshot; /* snap */
+       int thin; /* thin */
+       int create_thin_pool; /* thin */
        int zero; /* all */
        int major; /* all */
        int minor; /* all */
@@ -556,6 +557,7 @@ struct lvcreate_params {
        activation_change_t activate; /* non-snapshot, non-mirror */
 
        char *origin; /* snap */
+       char *pool;   /* thin */
        const char *vg_name; /* all */
        const char *lv_name; /* all */
 
index 8e89e3fb4683f7fa3417bc1bb64a3c8f76b50c4e..6639bdcecb22387160ca9a30d9b94b915f49700b 100644 (file)
@@ -107,7 +107,7 @@ static int _thin_text_import(struct lv_segment *seg, const struct config_node *s
                 if (!cn->v || cn->v->type != CFG_STRING)
                        return SEG_LOG_ERROR("Thin pool origin must be a string in");
 
-               if (!(seg->origin_lv = find_lv(seg->lv->vg, cn->v->v.str)))
+               if (!(seg->origin = find_lv(seg->lv->vg, cn->v->v.str)))
                        return SEG_LOG_ERROR("Unknown origin %s in",
                                             cn->v->v.str);
        }
@@ -123,8 +123,8 @@ static int _thin_text_export(const struct lv_segment *seg, struct formatter *f)
        outf(f, "thin_pool = \"%s\"", seg->thin_pool_lv->name);
        outf(f, "device_id = %" PRIu64, seg->device_id);
 
-       if (seg->origin_lv)
-               outf(f, "origin = \"%s\"", seg->origin_lv->name);
+       if (seg->origin)
+               outf(f, "origin = \"%s\"", seg->origin->name);
 
        return 1;
 }
@@ -229,8 +229,8 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
 
 #ifdef DEVMAPPER_SUPPORT
 #  ifdef DMEVENTD
-               if (_get_thin_dso_path(cmd))
-                       segtype->flags |= SEG_MONITORED;
+// FIXME               if (_get_thin_dso_path(cmd))
+// FIXME                       segtype->flags |= SEG_MONITORED;
 #  endif       /* DMEVENTD */
 #endif
                if (!lvm_register_segtype(seglib, segtype))
This page took 1.296422 seconds and 5 git commands to generate.