summaryrefslogtreecommitdiffstats
path: root/lib/metadata/lv.h
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-01-19 15:31:45 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-01-19 15:31:45 +0000
commit53d7985fa1476a7c0e430c01a6cb2cd679d4912e (patch)
tree0bb54a14b410bd35b7ad5fc6807222276ded4dbb /lib/metadata/lv.h
parent76ee08995eb8271a34c77352ffd499983d6c5752 (diff)
downloadlvm2-53d7985fa1476a7c0e430c01a6cb2cd679d4912e.tar.gz
lvm2-53d7985fa1476a7c0e430c01a6cb2cd679d4912e.tar.xz
lvm2-53d7985fa1476a7c0e430c01a6cb2cd679d4912e.zip
Add support to keep info about creation time and host for each LV
Basic support to keep info when the LV was created. Host and time is stored into LV mda section. FIXME: Current version doesn't support configurable string via lvm.conf and used fixed version strftime "%Y-%m-%d %T %z".
Diffstat (limited to 'lib/metadata/lv.h')
-rw-r--r--lib/metadata/lv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/metadata/lv.h b/lib/metadata/lv.h
index a54745f1..28ece5d4 100644
--- a/lib/metadata/lv.h
+++ b/lib/metadata/lv.h
@@ -46,6 +46,9 @@ struct logical_volume {
struct dm_list segments;
struct dm_list tags;
struct dm_list segs_using_this_lv;
+
+ uint64_t timestamp;
+ const char *hostname;
};
uint64_t lv_size(const struct logical_volume *lv);
@@ -71,5 +74,8 @@ char *lvseg_segtype_dup(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_tags_dup(const struct lv_segment *seg);
char *lvseg_devices(struct dm_pool *mem, const struct lv_segment *seg);
char *lvseg_seg_pe_ranges(struct dm_pool *mem, const struct lv_segment *seg);
-
+char *lv_time_dup(struct dm_pool *mem, const struct logical_volume *lv);
+char *lv_host_dup(struct dm_pool *mem, const struct logical_volume *lv);
+int lv_set_creation(struct logical_volume *lv,
+ const char *hostname, uint64_t timestamp);
#endif /* _LVM_LV_H */