Re: loopback blockdev deadlocks -- explained?

From: Jens Axboe (axboe@suse.de)
Date: Sun Apr 16 2000 - 10:13:39 EST


On Sun, Apr 16 2000, Steve Dodd wrote:
> > My favorite wild theory is that the underlying device is plugged.
>
> Hmmm. Here's my latest theory:
>
> [from ll_rw_blk.c, __make_request(): ]
> /*
> * Loop uses two requests, 1 for loop and 1 for the real device.
> * Cut max_req in half to avoid running out and deadlocking.
> */
> if ((major == LOOP_MAJOR) || (major == NBD_MAJOR))
> max_req >>= 1;
>
> This assumption presumably breaks down horribly for file-backed loop devices?
> The numbers of requests that the filesystem is going to generate to deal
> with one loop device request may well be >1. Does this sound plausible to
> anyone or have I missed something?

The assumption does indeed break down for file back devices, but that
should not be a problem. The worst case scenario would just cause
get_request to block, even though it would be safe to dish out a
request.

-- 
*  Jens Axboe <axboe@suse.de>
*  Linux CD/DVD-ROM, SuSE Labs
*  http://kernel.dk

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:09 EST