LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-05-21 12:52:01
Modified files:
. : WHATS_NEW
lib/metadata : metadata-exported.h replicator_manip.c
Log message:
Replicator: add sorted cmd_vg list
Introduce struct cmd_vg to store information about needed volume group name, vgid, flags and the pointer to opened VG.
Keep VGs list in alphabetical order for locking order.
Introduce functions:
cmd_vg_add() add new cmd_vg entry. cmd_vg_lookup() search cmd_vgs for vg_name. cmd_vg_read() open VGs in cmd_vgs list. cmd_vg_release() close VGs in reversed order.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1582&r2=1.1583
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.148&r2=1.149
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/replicator_manip.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.67 - =============================== + Add functions for handling cmd_vg structure. Extend _lv_each_dependency() with Replicator dependencies. Add check_replicator_segment() for catching internal Replicator errors. Initial lvm2 support for Replicator metadata handling.
lib/metadata/metadata-exported.h +16 -0
@@ -298,6 +298,15 @@struct segment_type ; +/* List with vg_name, vgid and flags */ +struct cmd_vg { +struct dm_list list; +const char *vg_name; +const char *vgid; +uint32_t flags; +struct volume_group *vg; +}; +/* ++ Replicator datatypes */ typedef enum { REPLICATOR_STATE_PASSIVE,
@@ -798,6 +807,13 @@int lv_is_slog (const struct logical_volume *lv);struct logical_volume *first_replicator_dev (const struct logical_volume *lv);/* -- metadata/replicator_manip.c */ +struct cmd_vg *cmd_vg_add (struct dm_pool *mem,struct dm_list *cmd_vgs, +const char *vg_name,const char *vgid, +uint32_t flags); +struct cmd_vg *cmd_vg_lookup (struct dm_list *cmd_vgs, +const char *vg_name,const char *vgid); +int cmd_vg_read (struct cmd_context *cmd,struct dm_list *cmd_vgs); +void cmd_vg_release (struct dm_list *cmd_vgs);struct logical_volume *find_pvmove_lv (struct volume_group *vg,struct device *dev,uint32_t lv_type);
lib/metadata/replicator_manip.c +125 -0
134 lines not on this page · raw message