[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectloop: busywait for release?
to the principal editors of drivers/block/loop.c,


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?


 \ /
  Last update: 2011-01-21 01:33    [W:0.045 / U:18.156 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site