LVM2 ./WHATS_NEW lib/cache/lvmetad.c lib/cache ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2012-03-03 18:32:54
Modified files:
. : WHATS_NEW lib/cache : lvmetad.c lvmetad.h man : pvscan.8.in tools : commands.h pvremove.c pvscan.c
Log message:
Scan all devices for lvmetad if 'pvscan --cache' used without device list.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2338&r2=1.2339
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmetad.c.diff?cvsroot=lvm2&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmetad.h.diff?cvsroot=lvm2&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/pvscan.8.in.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.171&r2=1.172
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvremove.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvscan.c.diff?cvsroot=lvm2&r1=1.59&r2=1.60
WHATS_NEW +3 -0
@@ -1,5 +1,8 @@ Version 2.02.95 - ================================ + Scan all devices for lvmetad if 'pvscan --cache' used without device list. + Populate lvmcache from lvmetad before displaying PVs in pvscan. (2.02.94) + Suppress incorrect -n pvscan warning now always displayed. (2.02.94) Version 2.02.94 - 3rd March 2012 ================================
lib/cache/lvmetad.c +5 -47
80 lines not on this page · raw message
lib/cache/lvmetad.h +8 -9
@@ -67,11 +67,10 @@ struct volume_group *vg);/* -* Inform the daemon that the device no longer exists. We do not support -* multiple device names, so this needs a unique and stable name, the same as -* provided to lvmetad_pv_found. +* Inform the daemon that the device no longer exists. */ -int lvmetad_pv_gone (struct device *dev); +int lvmetad_pv_gone (dev_t devno,const char *pv_name); +int lvmetad_pv_gone_by_dev (struct device *dev);/* * Request a list of all PVs available to lvmetad. If requested, this will also
@@ -101,10 +100,9 @@ const char *vgname, const char *vgid);/* -* Scan a single device and update lvmetad with the result(s). If the device -* node does not exist, it must be supplied in a major:minor format. +* Scan a single device and update lvmetad with the result(s). */ -int pvscan_lvmetad_single (struct cmd_context *cmd,const char *pv_name); +int pvscan_lvmetad_single (struct cmd_context *cmd,struct device *dev);# else /* LVMETAD_SUPPORT */
@@ -114,13 +112,14 @@# define lvmetad_vg_update (vg) (1)# define lvmetad_vg_remove (vg) (1)# define lvmetad_pv_found (pvid, device, fmt, label_sector, vg) (1) -# define lvmetad_pv_gone (dev) (1) +# define lvmetad_pv_gone (devno, pv_name) (1) +# define lvmetad_pv_gone_by_dev (dev) (1)# define lvmetad_pv_list_to_lvmcache (cmd) (1)# define lvmetad_pv_lookup (cmd, pvid, found) (0)# define lvmetad_pv_lookup_by_dev (cmd, dev, found) (0)# define lvmetad_vg_list_to_lvmcache (cmd) (1)# define lvmetad_vg_lookup (cmd, vgname, vgid) (NULL) -# define pvscan_lvmetad_single (cmd, pv_name) (0) +# define pvscan_lvmetad_single (cmd, dev) (0)# endif /* LVMETAD_SUPPORT */
man/pvscan.8.in +6 -5
@@ -3,7 +3,7 @@ pvscan \- scan all disks for physical volumes .SH SYNOPSIS .B pvscan -.RB [ \-\-cache " " DevicePath [ DevicePath ... ] ] +.RB [ \-\-cache " " [ DevicePath ... ] ] .RB [ \-d | \-\-debug ] .RB [ \-h | \-\-help ] .RB [ \-v | \-\-verbose ]
@@ -31,10 +31,11 @@ .BR \-u ", " \-\-uuid Show UUIDs (Uniform Unique Identifiers) in addition to device special names. .TP -.BR \-\-cache " " DevicePath [ DevicePath... ] -Scan a single device and instruct the lvmetad daemon to update its cached -state. Called internally by udev rules. The device is processed -\fBregardless\fP of any device filters set in lvm.conf. +.BR \-\-cache " " [ DevicePath... ] +Scan one or more devices and instruct the lvmetad daemon to update its cached +state accordingly. Called internally by udev rules. +All devices listed explicitly are processed \fBregardless\fP of any device +filters set in lvm.conf. .SH SEE ALSO .BR lvm (8), .BR pvcreate (8),
tools/commands.h +1 -1
@@ -663,7 +663,7 @@"List all physical volumes" ,PERMITTED_READ_ONLY ,"pvscan " "\n" -"\t[--cache DevicePath [DevicePath...]] " "\n" +"\t[--cache [DevicePath...]] " "\n" "\t[-d|--debug] " "\n" "\t{-e|--exported | -n|--novolumegroup} " "\n" "\t[-h|-?|--help]" "\n"
tools/pvremove.c +1 -2
@@ -128,8 +128,7 @@ goto out; } -/* FIXME Avoid error if we expect that daemon might not know device */ -if (!lvmetad_pv_gone (dev)) +if (!lvmetad_pv_gone_by_dev (dev)) goto_out; log_print("Labels on physical volume \"%s\" successfully wiped",
tools/pvscan.c +102 -7
150 lines not on this page · raw message