Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP1:GA
util-linux.3352
util-linux-loop-reuse-17.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File util-linux-loop-reuse-17.patch of Package util-linux.3352
From f27d989c67eb0d85b3bfc54807e626ff16e71f56 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec <sbrabec@suse.cz> Date: Wed, 17 Aug 2016 12:54:40 +0200 Subject: [PATCH 17/20] losetup: Prevent AUTOCLEAR detach race Kernel needs some time to delete a device after losetup --detach. If the losetup --find --nooverlay is called just after losetup --delete, it can sometimes attempt to recycle the device that is just being released. To prevent this race, clear the AUTOCLEAR flag of the device. [kzak@redhat.com: - rebase to the new version of the code] Signed-off-by: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com> --- sys-utils/losetup.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: util-linux-2.25/sys-utils/losetup.c =================================================================== --- util-linux-2.25.orig/sys-utils/losetup.c +++ util-linux-2.25/sys-utils/losetup.c @@ -462,6 +462,12 @@ static int create_loop(struct loopdev_cx loopcxt_deinit(lc); errx(EXIT_FAILURE, _("%s: overlapping encrypted loop device exists"), file); } + + lc->info.lo_flags &= !LO_FLAGS_AUTOCLEAR; + if (loopcxt_set_status(lc)) { + loopcxt_deinit(lc); + errx(EXIT_FAILURE, _("%s: failed to re-use loop device"), file); + } return 0; /* success, re-use */ } default: /* 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