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 144716 Details for
Bug 208993
need to return proper failed error code when exclusive lock attempt fails
[?]
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]
Idea for an improvement
incomplete.patch (text/plain), 3.04 KB, created by
Christine Caulfield
on 2007-01-03 16:03:35 UTC
(
hide
)
Description:
Idea for an improvement
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2007-01-03 16:03:35 UTC
Size:
3.04 KB
patch
obsolete
>Index: lib/commands/errors.h >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/commands/errors.h,v >retrieving revision 1.4 >diff -u -p -r1.4 errors.h >--- lib/commands/errors.h 30 Mar 2004 19:35:37 -0000 1.4 >+++ lib/commands/errors.h 3 Jan 2007 16:01:05 -0000 >@@ -17,8 +17,9 @@ > #define _LVM_ERRORS_H > > #define ECMD_PROCESSED 1 >-#define ENO_SUCH_CMD 2 >-#define EINVALID_CMD_LINE 3 >+#define ECMD_INCOMPLETE 2 >+#define ENO_SUCH_CMD 3 >+#define EINVALID_CMD_LINE 4 > #define ECMD_FAILED 5 > > #endif >Index: tools/vgchange.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/tools/vgchange.c,v >retrieving revision 1.54 >diff -u -p -r1.54 vgchange.c >--- tools/vgchange.c 16 Aug 2006 14:41:42 -0000 1.54 >+++ tools/vgchange.c 3 Jan 2007 16:01:05 -0000 >@@ -61,7 +61,7 @@ static int _register_lvs_in_vg(struct cm > } > > static int _activate_lvs_in_vg(struct cmd_context *cmd, >- struct volume_group *vg, int activate) >+ struct volume_group *vg, int activate, int *incomplete) > { > struct lv_list *lvl; > struct logical_volume *lv; >@@ -82,19 +82,29 @@ static int _activate_lvs_in_vg(struct cm > continue; > > if (activate == CHANGE_AN) { >- if (!deactivate_lv(cmd, lv)) >+ if (!deactivate_lv(cmd, lv)) { >+ incomplete++; > continue; >+ } > } else if (activate == CHANGE_ALN) { >- if (!deactivate_lv_local(cmd, lv)) >+ if (!deactivate_lv_local(cmd, lv)) { >+ incomplete++; > continue; >+ } > } else if (lv_is_origin(lv) || (activate == CHANGE_AE)) { >- if (!activate_lv_excl(cmd, lv)) >+ if (!activate_lv_excl(cmd, lv)) { >+ incomplete++; > continue; >+ } > } else if (activate == CHANGE_ALY) { >- if (!activate_lv_local(cmd, lv)) >+ if (!activate_lv_local(cmd, lv)) { >+ incomplete++; > continue; >- } else if (!activate_lv(cmd, lv)) >+ } >+ } else if (!activate_lv(cmd, lv)) { >+ incomplete++; > continue; >+ } > > if ((lv->status & PVMOVE) && > (pvname = get_pvmove_pvname_from_lv_mirr(lv))) { >@@ -129,6 +139,7 @@ static int _vgchange_available(struct cm > int lv_open, active, monitored; > int available; > int activate = 1; >+ int incomplete = 0; > > available = arg_uint_value(cmd, available_ARG, 0); > >@@ -162,17 +173,20 @@ static int _vgchange_available(struct cm > dmeventd_register_mode() ? "" : "un"); > } > >- if (activate && _activate_lvs_in_vg(cmd, vg, available)) >+ if (activate && _activate_lvs_in_vg(cmd, vg, available, &incomplete)) > log_verbose("Activated logical volumes in " > "volume group \"%s\"", vg->name); > >- if (!activate && _activate_lvs_in_vg(cmd, vg, available)) >+ if (!activate && _activate_lvs_in_vg(cmd, vg, available, &incomplete)) > log_verbose("Deactivated logical volumes in " > "volume group \"%s\"", vg->name); > > log_print("%d logical volume(s) in volume group \"%s\" now active", > lvs_in_vg_activated(vg), vg->name); >- return ECMD_PROCESSED; >+ if (incomplete) >+ return ECMD_INCOMPLETE; >+ else >+ return ECMD_PROCESSED; > } > > static int _vgchange_alloc(struct cmd_context *cmd, struct volume_group *vg)
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 208993
: 144716