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 573282 Details for
Bug 753105
[regression] 'lvremove' fails sometimes to remove snapshot volumes
[?]
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 for scanning /proc/mounts
Use-procmounts.patch (text/plain), 1.83 KB, created by
Zdenek Kabelac
on 2012-03-28 09:08:43 UTC
(
hide
)
Description:
Patch for scanning /proc/mounts
Filename:
MIME Type:
Creator:
Zdenek Kabelac
Created:
2012-03-28 09:08:43 UTC
Size:
1.83 KB
patch
obsolete
>--- > libdm/libdm-common.c | 42 +++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 41 insertions(+), 1 deletion(-) > >diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c >index fd775ca..5d12ba9 100644 >--- a/libdm/libdm-common.c >+++ b/libdm/libdm-common.c >@@ -1678,6 +1678,46 @@ static int _mounted_fs_on_device(const char *kernel_dev_name) > return r; > } > >+static int _mounted_fs_on_proc(const char *kernel_dev_name, uint32_t major, uint32_t minor) >+{ >+#define PROC_MOUNTS "/proc/mounts" >+ static const char proc_mounts[] = PROC_MOUNTS; >+ static char buffer[PATH_MAX + 16]; >+ char *split[4]; >+ FILE *fp; >+ struct stat st; >+ const char *devdir = DEV_DIR; >+ size_t devdir_len = strlen(devdir); >+ int r = 0; >+ >+ if (!(fp = fopen(proc_mounts, "r"))) { >+ log_sys_error("fopen", proc_mounts); >+ return 0; >+ } >+ >+ while (fgets(buffer, sizeof(buffer), fp)) { >+ /* >+ * Since we can't be sure which name is used for mount >+ * test all entries starting with /dev/ >+ */ >+ if (!strncmp(buffer, devdir, devdir_len) && >+ dm_split_words(buffer, 2, 0, split) == 2 && >+ !stat(split[0], &st) && S_ISBLK(st.st_mode) && >+ (major(st.st_rdev) == major) && >+ (minor(st.st_rdev) == minor)) { >+ log_verbose("Device %s (%u:%u) appears to be mounted as %s on %s.", >+ kernel_dev_name, major, minor, split[0], split[1]); >+ r = 1; >+ break; >+ } >+ } >+ >+ if (fclose(fp)) >+ log_sys_error("fclose", proc_mounts); >+ >+ return r; >+} >+ > int dm_device_has_mounted_fs(uint32_t major, uint32_t minor) > { > char kernel_dev_name[PATH_MAX]; >@@ -1687,7 +1727,7 @@ int dm_device_has_mounted_fs(uint32_t major, uint32_t minor) > return 0; > > /* Check /sys/fs/<fs_name>/<kernel_dev_name> presence */ >- return _mounted_fs_on_device(kernel_dev_name); >+ return _mounted_fs_on_proc(kernel_dev_name, major, minor); > } > > int dm_mknodes(const char *name) >-- >1.7.9.3 >
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 Raw
Actions:
View
Attachments on
bug 753105
: 573282 |
574829
|
574830