[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] Deadlock Issues with Local NBD Server



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: