From: Steve Lord <lord@xxxxxxx>
Subject: Re: deadlocks on ENOSPC
Date: Fri, 15 Jul 2005 07:21:25 -0500
> Hi Masano,
> That is definitely a bug, the extent logic is not supposed to lock
> allocation groups out of order. Multiple allocation groups are OK,
> but wrapping past the last allocation group back to the first again
> is not.
XFS needs order (ascending priorities) for both allocating and freeing
extents in multiple AGs. Freeing is OK, because extents are sorted in
xfs_bmap_add_free(). But allocating is not... :-p
> Try changing the definition of XFS_STRAT_WRITE_IMAPS from 2 to 1 in
> xfs_iomap.c as a workaround for now.
I've tried it, but I could not see any differences.
It seems that xfssyncd is stuck in the second xfs_bmap_alloc() ->
FYI: Here is the transaction table of xfssyncd at that time.
(taken by a tool, http://sourceforge.jp/projects/mcrash/ )
The transaction includes NO XFS_LID_DIRTY'ed item.
> xfs_trans d462d628
magic: 5452414e "TRAN"
logcb.func: 0 ( 0 )
forw/back: 0 0
type: f strat_write
ticket: de8b7b88 (xlog_ticket)
mountp: c172f400 (xfs_mount)
flags: 4 perm_log_res
items.free/unused: 7ff8 5
ITEM TYPE SIZ IDX FLAGS
items.descs 0: d524b050 (INODE ) 0 0 -
items.descs 1: ccd8b45c (BUF ) 0 1 - //NOTE: AG#15 AGF
items.descs 2: ccd8ba24 (BUF ) 0 2 -
busy.free/unused 7fffffff 0