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 158763 Details for
Bug 247448
LVM2 allows final MDA to be removed from a VG
[?]
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]
rfc patch adding checking for final MDA removal
LVM2-vgreduce_mda_check.patch (text/plain), 2.53 KB, created by
Bryn M. Reeves
on 2007-07-09 12:48:15 UTC
(
hide
)
Description:
rfc patch adding checking for final MDA removal
Filename:
MIME Type:
Creator:
Bryn M. Reeves
Created:
2007-07-09 12:48:15 UTC
Size:
2.53 KB
patch
obsolete
>Index: lib/format_text/format-text.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/format_text/format-text.c,v >retrieving revision 1.77 >diff -u -r1.77 format-text.c >--- lib/format_text/format-text.c 2 Jul 2007 11:17:21 -0000 1.77 >+++ lib/format_text/format-text.c 7 Jul 2007 18:31:55 -0000 >@@ -84,6 +84,16 @@ > } > > /* >+ * Check if metadata area belongs to pv >+ */ >+static int _mda_on_pv_raw(struct format_instance *fid __attribute((unused)), >+ struct physical_volume *pv, struct metadata_area *mda) >+{ >+ struct mda_context *mdac = (struct mda_context *) mda->metadata_locn; >+ return pv->dev == mdac->area.dev; >+} >+ >+/* > * Check if metadata area belongs to vg > */ > static int _mda_in_vg_raw(struct format_instance *fid __attribute((unused)), >@@ -1557,6 +1567,7 @@ > .vg_precommit = _vg_precommit_raw, > .vg_commit = _vg_commit_raw, > .vg_revert = _vg_revert_raw, >+ .mda_on_pv = _mda_on_pv_raw, > .mda_in_vg = _mda_in_vg_raw, > .pv_analyze_mda = _pv_analyze_mda_raw, > }; >Index: lib/metadata/metadata.h >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/metadata/metadata.h,v >retrieving revision 1.166 >diff -u -r1.166 metadata.h >--- lib/metadata/metadata.h 19 Jun 2007 04:36:12 -0000 1.166 >+++ lib/metadata/metadata.h 7 Jul 2007 18:31:55 -0000 >@@ -180,6 +180,11 @@ > int (*vg_remove) (struct format_instance * fi, struct volume_group * vg, > struct metadata_area * mda); > /* >+ * Check if a metadata area is stored on a pv >+ */ >+ int (*mda_on_pv) (struct format_instance * fi, >+ struct physical_volume * pv, struct metadata_area *mda); >+ /* > * Check if metadata area belongs to vg > */ > int (*mda_in_vg) (struct format_instance * fi, >Index: tools/vgreduce.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/tools/vgreduce.c,v >retrieving revision 1.65 >diff -u -r1.65 vgreduce.c >--- tools/vgreduce.c 19 Jun 2007 04:36:12 -0000 1.65 >+++ tools/vgreduce.c 7 Jul 2007 18:31:56 -0000 >@@ -380,6 +380,18 @@ > > pvl = find_pv_in_vg(vg, name); > >+ if (vg->fid->fmt->features & FMT_MDAS >+ && list_size(&vg->fid->metadata_areas) == 1) { >+ struct metadata_area *mda; >+ mda = list_item(list_first(&vg->fid->metadata_areas), struct metadata_area); >+ if (mda->ops->mda_on_pv && mda->ops->mda_on_pv(vg->fid, pv, mda)) { >+ log_error("Can't remove final metadata area on " >+ "physical volume \"%s\" from volume " >+ "group \"%s\"", name, vg->name); >+ return ECMD_FAILED; >+ } >+ } >+ > if (!archive(vg)) > return ECMD_FAILED; >
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 247448
:
158763
|
298754
|
298755