Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:sschapiro:openstack:upstream
lvm2
lvm2-2_02_85-fix-open_control-and-mitigate-warn...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lvm2-2_02_85-fix-open_control-and-mitigate-warning-messages-when-running-as-non-root.patch of Package lvm2
WHATS_NEW | 1 + WHATS_NEW_DM | 1 + lib/activate/dev_manager.c | 6 ++---- libdm/ioctl/libdm-iface.c | 9 ++++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 8ce4e2a..76a44bb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Mitigate annoying error warning from device is usable check if run as non-root. Avoid possible endless loop in _free_vginfo when 4 or more VGs have same name. Fix to make resuming exclusive cluster mirror use local target type. diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index a73830b..e00c1ac 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.64 - =================================== + Fallback to control node creation only if node doesn't exist yet. Lower secure data flag warning to verbose level if unsupported by kernel. Version 1.02.63 - 9th February 2011 diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index b485404..32842f9 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -141,10 +141,8 @@ int device_is_usable(struct device *dev) int only_error_target = 1; int r = 0; - if (!(dmt = dm_task_create(DM_DEVICE_STATUS))) { - log_error("Failed to create dm_task struct to check dev status"); - return 0; - } + if (!(dmt = dm_task_create(DM_DEVICE_STATUS))) + return_0; if (!dm_task_set_major_minor(dmt, MAJOR(dev->dev), MINOR(dev->dev), 1)) goto_out; diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 57d0618..8019b7f 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -365,8 +365,9 @@ static int _open_and_assign_control_fd(const char *control, _close_control_fd(); if ((_control_fd = open(control, O_RDWR)) < 0) { - if (!(ignore_nodev && errno == ENODEV)) - log_sys_error("open", control); + if (ignore_nodev && errno == ENODEV) + return 1; + log_sys_error("open", control); return 0; } @@ -412,7 +413,9 @@ static int _open_control(void) !_create_control(control, major, MAPPER_CTRL_MINOR)) goto error; - _open_and_assign_control_fd(control, 1); + /* Fallback to old code only if control node doesn't exist */ + if (!_open_and_assign_control_fd(control, 1)) + goto error; } /*
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor