summaryrefslogtreecommitdiffstats
path: root/include/loopdev.h
diff options
context:
space:
mode:
authorKarel Zak2014-01-24 13:58:40 +0100
committerKarel Zak2014-01-24 13:58:40 +0100
commit663bf040611240d164f2464b4d892ecd2b02fa6f (patch)
tree35dcd9192bb4ecd16e668d39fdcd1f61d71c3e75 /include/loopdev.h
parentinclude/c.h: prefer nanosleep() over usleep() (diff)
downloadkernel-qcow2-util-linux-663bf040611240d164f2464b4d892ecd2b02fa6f.tar.gz
kernel-qcow2-util-linux-663bf040611240d164f2464b4d892ecd2b02fa6f.tar.xz
kernel-qcow2-util-linux-663bf040611240d164f2464b4d892ecd2b02fa6f.zip
losetup: wait for udev
On system with /dev/lop-control the udevd creates /dev/loopN nodes. It seems better to wait a moment after unsuccessful open(/dev/loopN) and try it to open again. The problem is pretty visible on systems where udevd also modifies permission for loopN devices, then open() fails with EACCES when losetup executed by non-root user (but user who is in "disk" group). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1045432 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/loopdev.h')
-rw-r--r--include/loopdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/loopdev.h b/include/loopdev.h
index eb328a080..793539935 100644
--- a/include/loopdev.h
+++ b/include/loopdev.h
@@ -99,6 +99,7 @@ struct loopdev_cxt {
unsigned int extra_check:1; /* unusual stuff for iterator */
unsigned int debug:1; /* debug mode ON/OFF */
unsigned int info_failed:1; /* LOOP_GET_STATUS ioctl failed */
+ unsigned int control_ok:1; /* /dev/loop-control success */
struct sysfs_cxt sysfs; /* pointer to /sys/dev/block/<maj:min>/ */
struct loop_info64 info; /* for GET/SET ioctl */