Re: 2.4 TODO addition (loopback fs deadlocks)

From: Steve Dodd (steved@loth.demon.co.uk)
Date: Mon Mar 27 2000 - 01:36:37 EST


On Sun, Mar 26, 2000 at 11:42:24PM +0100, Stephen C. Tweedie wrote:
> On Thu, Mar 23, 2000 at 09:23:20AM +0000, Steve Dodd wrote:

> > Errrm, call me stupid, but doesn't generic_unplug_device grab the
> > io_request_lock? Which will still be held when ext2's block_getblk sleeps..

> It shouldn't be. Sleeping while holding a spinlock of any description
> is entirely against the rules!

That was what was worrying me :) However, I was wrong - do_lo_request drops
the io_request_lock. (I should have guessed this, as a spinlock held whilst
sleeping wouldn't lock up on UP). I'm playing with kdb to get some stack
traces. My current test case is

dd if=/dev/zero of=loopfoo bs=1024 count=50000
losetup /dev/loop0 loopfoo
mke2fs /dev/loop0
mount /dev/loop0 mnt
cp -av src mnt

This locks within seconds (loopfoo is on an ext2 fs). The start of the call
trace for the cp process is:

sys_read
generic_file_read
do_generic_file_read
ext2_readpage
block_read_full_page
ext2_get_block
bread
__wait_on_buffer
generic_unplug_device
[loop.o guts]
ext2_prepare_write
block_prepare_write
__block_prepare_write
ext2_get_block
[..]

When I've educated kdb about long lines I'll be able to see the rest of it ..

-- 
Hail Eris!

- 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 : Fri Mar 31 2000 - 21:00:19 EST