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 144160 Details for
Bug 154691
RHEL4: (LVM2) lvextend should default to the size of the pv + current size of lv
[?]
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]
Patch to make extents optional for lvextend when pvs are on cmdline
lvm2-make-extents-optional-when-pvs-on-cmdline.patch (text/plain), 2.09 KB, created by
Dave Wysochanski
on 2006-12-21 04:54:27 UTC
(
hide
)
Description:
Patch to make extents optional for lvextend when pvs are on cmdline
Filename:
MIME Type:
Creator:
Dave Wysochanski
Created:
2006-12-21 04:54:27 UTC
Size:
2.09 KB
patch
obsolete
>Files LVM2.orig/tools/lvm and LVM2/tools/lvm differ >diff -Nurp LVM2.orig/tools/lvresize.c LVM2/tools/lvresize.c >--- LVM2.orig/tools/lvresize.c 2006-12-20 23:03:35.000000000 -0500 >+++ LVM2/tools/lvresize.c 2006-12-20 23:37:45.000000000 -0500 >@@ -61,11 +61,6 @@ static int _lvresize_params(struct cmd_c > if (!strcmp(cmd_name, "lvextend")) > lp->resize = LV_EXTEND; > >- if (arg_count(cmd, extents_ARG) + arg_count(cmd, size_ARG) != 1) { >- log_error("Please specify either size or extents (not both)"); >- return 0; >- } >- > if (arg_count(cmd, extents_ARG)) { > lp->extents = arg_uint_value(cmd, extents_ARG, 0); > lp->sign = arg_sign_value(cmd, extents_ARG, SIGN_NONE); >@@ -133,6 +128,7 @@ static int _lvresize(struct cmd_context > uint32_t seg_extents; > uint32_t sz, str; > struct list *pvh = NULL; >+ struct pv_list *pvl; > char size_buf[SIZE_BUF]; > char lv_path[PATH_MAX]; > >@@ -255,6 +251,25 @@ static int _lvresize(struct cmd_context > break; > } > >+ if (lp->resize == LV_REDUCE) { >+ if (lp->argc) >+ log_print("Ignoring PVs on command line when reducing"); >+ } else if (!(pvh = lp->argc ? create_pv_list(cmd->mem, vg, lp->argc, >+ lp->argv, 1) : &vg->pvs)) { >+ stack; >+ return ECMD_FAILED; >+ } >+ >+ if (arg_count(cmd, extents_ARG) + arg_count(cmd, size_ARG) != 1) { >+ /* assert(lp->extents == 0); ??? */ >+ log_print("Using all free extents from PVs on cmdline..."); >+ list_iterate_items(pvl, pvh) >+ lp->extents += pvl->pv->pe_count - >+ pvl->pv->pe_alloc_count; >+ lp->extents += lv->le_count; >+ log_print("Setting extents to %d...", lp->extents); >+ } >+ > if (lp->sign == SIGN_PLUS) > lp->extents += lv->le_count; > >@@ -458,15 +473,6 @@ static int _lvresize(struct cmd_context > } > } > >- if (lp->resize == LV_REDUCE) { >- if (lp->argc) >- log_print("Ignoring PVs on command line when reducing"); >- } else if (!(pvh = lp->argc ? create_pv_list(cmd->mem, vg, lp->argc, >- lp->argv, 1) : &vg->pvs)) { >- stack; >- return ECMD_FAILED; >- } >- > if (lp->resize == LV_REDUCE || lp->resizefs) { > memset(&info, 0, sizeof(info)); > >Files LVM2.orig/tools/lvresize.o and LVM2/tools/lvresize.o differ
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 154691
:
144160
|
192151
|
200201