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 150115 Details for
Bug 203037
deactivation of lv with snapshots may leave broken linked dev entries around
[?]
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 fix/workaround
lvm2-remove-children-symlinks.patch (text/plain), 2.49 KB, created by
Milan Broz
on 2007-03-15 09:48:11 UTC
(
hide
)
Description:
Proposed fix/workaround
Filename:
MIME Type:
Creator:
Milan Broz
Created:
2007-03-15 09:48:11 UTC
Size:
2.49 KB
patch
obsolete
>Index: lib/activate/dev_manager.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/activate/dev_manager.c,v >retrieving revision 1.121 >diff -u -r1.121 dev_manager.c >--- lib/activate/dev_manager.c 8 Mar 2007 19:58:04 -0000 1.121 >+++ lib/activate/dev_manager.c 14 Mar 2007 14:38:42 -0000 >@@ -973,6 +973,28 @@ > return r; > } > >+/* >+ * Remove LV symlinks for children of supplied root node. >+ */ >+static int _remove_lv_symlinks(struct dev_manager *dm, struct dm_tree_node *root) >+{ >+ void *handle = NULL; >+ struct dm_tree_node *child; >+ char *vgname, *lvname, *layer; >+ int r = 1; >+ >+ while ((child = dm_tree_next_child(&handle, root, 0))) { >+ if (!dm_split_lvm_name(dm->mem, dm_tree_node_get_name(child), &vgname, &lvname, &layer)) { >+ r = 0; >+ continue; >+ } >+ >+ fs_del_lv_byname(dm->cmd->dev_dir, vgname, lvname); >+ } >+ >+ return r; >+} >+ > static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root) > { > void *handle = NULL; >@@ -1032,6 +1054,8 @@ > /* Deactivate LV and all devices it references that nothing else has open. */ > if (!dm_tree_deactivate_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1)) > goto_out; >+ if (!_remove_lv_symlinks(dm, root)) >+ log_error("Failed to remove symlinks for %s.", lv->name); > break; > case SUSPEND: > dm_tree_skip_lockfs(root); >Index: lib/activate/fs.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/activate/fs.c,v >retrieving revision 1.38 >diff -u -r1.38 fs.c >--- lib/activate/fs.c 21 Aug 2006 12:54:51 -0000 1.38 >+++ lib/activate/fs.c 14 Mar 2007 14:38:42 -0000 >@@ -338,6 +338,11 @@ > "", ""); > } > >+int fs_del_lv_byname(const char *dev_dir, const char *vg_name, const char *lv_name) >+{ >+ return _fs_op(FS_DEL, dev_dir, vg_name, lv_name, "", ""); >+} >+ > int fs_rename_lv(struct logical_volume *lv, > const char *dev, const char *old_name) > { >Index: lib/activate/fs.h >=================================================================== >RCS file: /cvs/lvm2/LVM2/lib/activate/fs.h,v >retrieving revision 1.10 >diff -u -r1.10 fs.h >--- lib/activate/fs.h 30 Mar 2004 19:35:37 -0000 1.10 >+++ lib/activate/fs.h 14 Mar 2007 14:38:42 -0000 >@@ -25,6 +25,7 @@ > */ > int fs_add_lv(const struct logical_volume *lv, const char *dev); > int fs_del_lv(const struct logical_volume *lv); >+int fs_del_lv_byname(const char *dev_dir, const char *vg_name, const char *lv_name); > int fs_rename_lv(struct logical_volume *lv, > const char *dev, const char *old_name); > void fs_unlock(void);
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 203037
: 150115