Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 300272 Details for
Bug 284771
RFE: pvmove: give better diagnostic for invalid "-n LV" name
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
lvm2-pvmove-check-lvname.patch (text/plain), 2.82 KB, created by
Milan Broz
on 2008-04-03 15:50:39 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Milan Broz
Created:
2008-04-03 15:50:39 UTC
Size:
2.82 KB
patch
obsolete
>--- > WHATS_NEW | 1 + > test/t-pv-range-overflow.sh | 2 +- > tools/pvmove.c | 21 +++++++++++++++++++-- > 3 files changed, 21 insertions(+), 3 deletions(-) > >Index: lvm2.up/tools/pvmove.c >=================================================================== >--- lvm2.up.orig/tools/pvmove.c 2008-04-03 17:26:21.000000000 +0200 >+++ lvm2.up/tools/pvmove.c 2008-04-03 17:46:10.000000000 +0200 >@@ -196,6 +196,7 @@ static struct logical_volume *_set_up_pv > struct logical_volume *lv_mirr, *lv; > struct lv_list *lvl; > uint32_t log_count = 0; >+ int lv_found = 0; > > /* FIXME Cope with non-contiguous => splitting existing segments */ > if (!(lv_mirr = lv_create_empty("pvmove%d", NULL, >@@ -217,9 +218,14 @@ static struct logical_volume *_set_up_pv > /* Find segments to be moved and set up mirrors */ > list_iterate_items(lvl, &vg->lvs) { > lv = lvl->lv; >- if ((lv == lv_mirr) || >- (lv_name && strcmp(lv->name, lv_name))) >+ if ((lv == lv_mirr)) > continue; >+ if (lv_name) { >+ if (strcmp(lv->name, lv_name)) >+ continue; >+ else >+ lv_found = 1; >+ } > if (lv_is_origin(lv) || lv_is_cow(lv)) { > log_print("Skipping snapshot-related LV %s", lv->name); > continue; >@@ -245,6 +251,11 @@ static struct logical_volume *_set_up_pv > return_NULL; > } > >+ if (lv_name && !lv_found) { >+ log_error("LV %s not found.", lv_name); >+ return NULL; >+ } >+ > /* Is temporary mirror empty? */ > if (!lv_mirr->le_count) { > log_error("No data to move for %s", vg->name); >@@ -362,6 +373,12 @@ static int _set_up_pvmove(struct cmd_con > stack; > return EINVALID_CMD_LINE; > } >+ >+ if (!validate_name(lv_name)) { >+ log_error("Logical volume name \"%s\" is invalid", >+ lv_name); >+ return EINVALID_CMD_LINE; >+ } > } > > /* Read VG */ >Index: lvm2.up/WHATS_NEW >=================================================================== >--- lvm2.up.orig/WHATS_NEW 2008-04-03 17:25:55.000000000 +0200 >+++ lvm2.up/WHATS_NEW 2008-04-03 17:27:52.000000000 +0200 >@@ -1,5 +1,6 @@ > Version 2.02.34 - > =================================== >+ Add validation of LV name in pvmove command. > Add per-command flags to control which commands use the VG metadata cache. > Fix vgsplit locking of new VG (2.02.30). > Avoid erroneous vgsplit error message for new VG. (2.02.29) >Index: lvm2.up/test/t-pv-range-overflow.sh >=================================================================== >--- lvm2.up.orig/test/t-pv-range-overflow.sh 2008-04-03 17:25:49.000000000 +0200 >+++ lvm2.up/test/t-pv-range-overflow.sh 2008-04-03 17:47:24.000000000 +0200 >@@ -44,7 +44,7 @@ test_expect_success \ > 'pvmove -v -nbogus $d1 $d2 2> err > test $? = 5 && > tail -n1 err > out && >- echo " No data to move for $vg" > expected && >+ echo " LV bogus not found." > expected && > diff -u out expected' > > # With lvm-2.02.28 and earlier, on a system with 64-bit "long int",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 284771
:
191761
| 300272