Op maandag 3 maart 2014 13:26:43 schreef Paul Clements:
> On Mon, Mar 3, 2014 at 1:16 PM, Andreas Klauer
>
> <[email protected]> wrote:
> > So the method seems to be:
> >
> > 1) check /proc/partitions
> > 2) check /sys/block/nbd*/pid
> > 3) lock your own program and hope no-one is racing you
>
> Yes, that's basically it. And if any ioctl returns -EBUSY, then retry
> from the start. BTW, "losetup --find" just looks at /proc/partitions.
We did have a vague discussion once about having something like a
/dev/nbdmaster which would be used for a "give me an nbd device" type
call. This would also mean that /dev/nbdX would not exist until the "give me
an nbd device" call had been made.
I still think that would be a good idea, but AFAIK it never got implemented.
Paul, what's your opinion on that?
--
This end should point toward the ground if you want to go to space.
If it starts pointing toward space you are having a bad problem and you
will not go to space today.
-- http://xkcd.com/1133/
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general