> On 10. Aug 2018, at 15:46, Emmanuel Dreyfus <m...@netbsd.org> wrote:
> 
> Hello
> 
> How are user processes supposed to find an unused fss device?
> In dump(8) code,  there is an iteration on /dev/rfss* trying to
> performan an ioctl FSSIOCSET. The code tests for EBUSY on failure,
> but in my experience that struggles to happen: if the device is 
> already in use, the ioctl will sleep in the kernel for ages before 
> getting a reply.
> 
> This is something I can even experience with fssconfig -l, which 
> hangs for a while if dump is running.
> 
> Is there another way? I thought about searching vnode in kernel to 
> check if the device is already used by someone else, but that looks 
> overkill. 
> 
> Perhaps the right way is to add a FSSIOBUSY ioctl that would
> use mutex_tryenter and return EBUSY if the device is in use?

When fssconfig "hangs" the dump is creating a snapshot.  Creating
a snapshot (and suspending a file system) is serialized.  Allowing
more than one file system suspension at a time will deadlock most
of the time.

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)

Reply via email to