On Mon, Oct 01, 2012 at 08:55:28AM +0900, Itaru Kitayama wrote:
Thank you for your comments. I wanted to fix a lockdep warning on a
possible deadlock
case encountered during the xfstests with a scratch space almost full.
This is the known cleaner/writeback deadlock and avoiding writeback
under device congestion may avoid it, but not in all cases and we want
to fix it properly (Miao sent the patches, but they're not merged so
far).
You are right I encountered the worst scenario you described below, I
drop this patch and
I'll look at btrfs_congested_fn more to examine the mechanisms
implemented there are
working as expected.
I'm not sure what you want to achieve with the congestion checks (other
than avoid the cleaner deadlock).
david