On Tue, Aug 02, 2016 at 07:55:03PM +0200, Stanislav Brabec wrote: > Here is a patch set that is based on a "safe implementation of loop > reuse" patch set sent three weeks ago. > > It addresses the same loop device issues in losetup. > > Issues not addressed: > Calling losetup twice still fails (and it is probably correct): > losetup /dev/loop0 loop.img > losetup /dev/loop0 loop.img > > "[PATCH 6/8] losetup: Prevent rare detach race" needs a careful review, > as I don't have a test case for it. It is even possible to skip it. It > addresses a theoretical race problem: > > LOOPDEV=$(losetup -f --show loop.img) > losetup -d $LOOPDEV > sleep {a very special amount of time} > losetup -f --show loop.img I have merged this feature, but it's not enabled by default. You have to use --nooverlap losetup --find --nooverlap file.img or losetup --nooverlap /dev/loopN file.img The man page has been also updated to make it more obvious for users that --nooverlap is a good idea. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html