Messages in this thread | | | Date | Fri, 21 Jan 2011 01:31:45 +0100 (CET) | From | Jan Engelhardt <> | Subject | loop: busywait for release? |
| |
to the principal editors of drivers/block/loop.c,
Hi,
I have here a program that sets up a loop device, does its (quite minimal) work and releases the loop device again.
As soon as a loop device is set up using LOOP_SET_FD, userspace programs like udev immediately pounce on the loop device for fstype identification and whatnot, and render the release of the device futile with -EBUSY.
I could retry until EBUSY is no longer returned, however, since I see nothing in the loop device driver that could help fence off _new openers_, EBUSY may be encountered indefinitely.
I reckon vfsmounts have the same issue, though one can use `umount -l` to fence new processes off, and then (if desired) kill existing ones.
What is the preferred way to solve this for loop?
thanks, Jan
| |