Re: [Nbd] Deadlock Issues with Local NBD Server
- To: Folkert van Heusden <folkert.van.heusden@...17...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Deadlock Issues with Local NBD Server
- From: Wouter Verhelst <w@...112...>
- Date: Wed, 28 Sep 2011 12:23:41 +0200
- Message-id: <20110928102341.GA18952@...3...>
- In-reply-to: <CAFDOyVAyLaoW6Zig2H7YSokO9XfBH5MEbYu58ZQUvY6k2GwJfw@...18...>
- References: <20110927105745.GB1361@...846...> <CAFDOyVAyLaoW6Zig2H7YSokO9XfBH5MEbYu58ZQUvY6k2GwJfw@...18...>
On Tue, Sep 27, 2011 at 01:04:23PM +0200, Folkert van Heusden wrote:
> > I'm interested in setting up a FUSE-like infrastructure in userspace that will
> > use NBD and allow people to develop virtual block devices without having to
> > write any kernel code. For example, one of the things I would like to do is
> > create a deduplicating block device, and it would be easiest if I could
>
> Dedupping block device? Something like http://vanheusden.com/java/BlackHole/ ?
>
> > I have read about similar attempts and I know that there are deadlock issues
> > associated with running NBD as a client and server on the same machine. So I was
>
> As far as I experienced this only happens with swap on nbd.
No, NBD can deadlock with filesystems on NBD too, though it's a
different deadlock. There seems to be a common cache handling for all
block devices; this can result in nbd-server waiting for another block
device to flush its caches before it will be allowed to write to disk
again. If that 'other device' is the block device that nbd-server is
serving, you've got a deadlock.
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: