master - pvcreate: Fix cache state with filters/sig wiping.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf78e55ef311b0bea7993c5405d637e46a1b8394 Commit: bf78e55ef311b0bea7993c5405d637e46a1b8394 Parent: 20503ff0675616823bcc9aa67f3e6d14a4172277 Author: Alasdair G Kergon <[email protected]> AuthorDate: Thu Aug 14 01:30:01 2014 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Thu Aug 14 01:30:01 2014 +0100
pvcreate: Fix cache state with filters/sig wiping.
_pvcreate_check() has two missing requirements:
After refreshing filters there must be a rescan.
(Otherwise the persistent filter may remain empty.)
After wiping a signature, the filters must be refreshed.
(A device that was previously excluded by the filter due to
its signature might now need to be included.)
If several devices are added at once, the repeated scanning isn't strictly needed, but we can address that later as part of the command processing restructuring (by grouping the devices).
Replace the new pvcreate code added by commit 54685c20fc9dfb155a2e5bc9d8cf5f0aad944305 "filters: fix regression caused by commit e80884cd080cad7e10be4588e3493b9000649426"
with this change to _pvcreate_check().
The filter refresh problem dates back to commit acb4b5e4de3c49d36fe756f6fb9997ec179b89c2 "Fix pvcreate device check."
--- WHATS_NEW | 1 + lib/metadata/metadata.c | 48 ++++++++++++++++++++++++++++------------------ tools/pvcreate.c | 9 -------- 3 files changed, 30 insertions(+), 28 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.110 - ================================== + Fix pvcreate_check() to update cache correctly after signature wiping. Fix primary device lookup failure for partition when processing mpath filter. If LV inactive and non-clustered, do not issue "Cannot deactivate" on -aln. Remove spurious "Skipping mirror LV" message on pvmove of clustered mirror.
lib/metadata/metadata.c +29 -19
115 lines not on this page · raw message
tools/pvcreate.c +0 -9
@@ -105,15 +105,6 @@ int pvcreate(struct cmd_context *cmd, int argc, char **argv)return EINVALID_CMD_LINE ; } -/* -* Make sure we don't overwrite any existing signature -* that may have been created after last time we did filtering. -*/ -if (!(refresh_filters (cmd))) { -log_error ("Failed to refresh filters before pvcreate." ); -return ECMD_FAILED ; - } -for (i =0 ; i < argc; i++) {if (sigint_caught ()) return_ECMD_FAILED;