loop: busywait for release?
From: Jan Engelhardt
Date: Thu Jan 20 2011 - 19:31:51 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/