]> sourceware.org Git - lvm2.git/commitdiff
Refactor metadata.[ch] into lv.[ch] for lv functions.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 30 Sep 2010 13:05:45 +0000 (13:05 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 30 Sep 2010 13:05:45 +0000 (13:05 +0000)
This patch is similar to the other patches for pv and vg
functionality, and separates lv functionality into separate
files, concentrating on reporting fields and simple functions.

include/.symlinks.in
lib/Makefile.in
lib/metadata/metadata-exported.h
lib/metadata/metadata.c

index 398e8561f875139d8756d857a83d492bfbc21ca6..7fd6171e3147a72705e51c9c7cdb2ec0e56bb0b1 100644 (file)
@@ -30,6 +30,7 @@
 @top_srcdir@/lib/locking/locking.h
 @top_srcdir@/lib/log/log.h
 @top_srcdir@/lib/log/lvm-logging.h
+@top_srcdir@/lib/metadata/lv.h
 @top_srcdir@/lib/metadata/lv_alloc.h
 @top_srcdir@/lib/metadata/metadata.h
 @top_srcdir@/lib/metadata/metadata-exported.h
index 2c173b3aa429407d39998d5b312aaa70edf0b50e..ab944fa36008f185da0a3dbed80242358ab00a7c 100644 (file)
@@ -73,6 +73,7 @@ SOURCES =\
        locking/locking.c \
        locking/no_locking.c \
        log/log.c \
+       metadata/lv.c \
        metadata/lv_manip.c \
        metadata/merge.c \
        metadata/metadata.c \
index 86c90fab1d178fa936a1d59b6f5f6509965f23f0..447e4afd74f0ba7d8e0e69e3aa6f9cb3472b968e 100644 (file)
@@ -24,6 +24,7 @@
 #include "uuid.h"
 #include "pv.h"
 #include "vg.h"
+#include "lv.h"
 
 #define MAX_STRIPES 128U
 #define SECTOR_SHIFT 9L
@@ -291,33 +292,6 @@ struct lv_segment {
 #define seg_pv(seg, s)         (seg)->areas[(s)].u.pv.pvseg->pv
 #define seg_lv(seg, s)         (seg)->areas[(s)].u.lv.lv
 
-struct logical_volume {
-       union lvid lvid;
-       char *name;
-
-       struct volume_group *vg;
-
-       uint64_t status;
-       alloc_policy_t alloc;
-       uint32_t read_ahead;
-       int32_t major;
-       int32_t minor;
-
-       uint64_t size;          /* Sectors */
-       uint32_t le_count;
-
-       uint32_t origin_count;
-       struct dm_list snapshot_segs;
-       struct lv_segment *snapshot;
-
-       struct replicator_device *rdevice;/* For replicator-devs, rimages, slogs - reference to rdevice */
-       struct dm_list rsites;  /* For replicators - all sites */
-
-       struct dm_list segments;
-       struct dm_list tags;
-       struct dm_list segs_using_this_lv;
-};
-
 struct pe_range {
        struct dm_list list;
        uint32_t start;         /* PEs */
@@ -744,7 +718,6 @@ char *generate_lv_name(struct volume_group *vg, const char *format,
 */
 int pv_change_metadataignore(struct physical_volume *pv, uint32_t mda_ignore);
 
-uint64_t lv_size(const struct logical_volume *lv);
 
 int vg_check_write_mode(struct volume_group *vg);
 #define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED)
index 3bf8391628787f0a3084fc513d8178ca5ae7ea64..87da5faf3f189b3f9782942dd041a07f96431f65 100644 (file)
@@ -3921,11 +3921,6 @@ int pv_change_metadataignore(struct physical_volume *pv, uint32_t mda_ignored)
        return 1;
 }
 
-uint64_t lv_size(const struct logical_volume *lv)
-{
-       return lv->size;
-}
-
 /**
  * pv_by_path - Given a device path return a PV handle if it is a PV
  * @cmd - handle to the LVM command instance
This page took 0.043755 seconds and 5 git commands to generate.