lkml.org 
[lkml]   [2001]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPossible deadlock with ->writepaged version of flush_dirty_buffers() and 2.4.0

Hi Chris,

It seems there is a possible deadlock condition with your patch which
changes flush_dirty_buffers() to use ->writepage (something which we
_definately_ want for 2.5). Take a look:


mark_buffer_dirty->balance_dirty->wakeup_bdflush->flush_dirty_buffers->
writepage->block_write_full_page->__block_write_full_page->get_block->
ext2_get_block->ext2_alloc_branch->

ext2_alloc_block->ext2_new_block->lock_super
or
getblk()->lock_super


I dont see any reason why this deadlock could'nt happen in practice now.

If I'm right, it will pretty nasty to fix this. One possible solution is
to _never_ call mark_buffer_dirty() with the superblock lock held (ext2
has a lot of places likes this right now)

Comments?


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

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.042 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site