xfs
[Top] [All Lists]

Re: deadlocks on ENOSPC

To: lord@xxxxxxx
Subject: Re: deadlocks on ENOSPC
From: ASANO Masahiro <masano@xxxxxxxxxxxxxx>
Date: Sun, 17 Jul 2005 16:55:49 +0900 (JST)
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <42D7AA45.2040608@xxxxxxx>
References: <20050715.150717.28782011.masano@xxxxxxxxxxxxxx> <42D7AA45.2040608@xxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi Steve,

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.

I agree.
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() ->
xfs_alloc_vextent() path.

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.next:          0
logcb.func:          0 (        0 )
forw/back:           0        0
type:         f  strat_write
log_res:      1a6b8
log_count:    2
ticket:       de8b7b88  (xlog_ticket)
lsn:          0
commit_lsn:   0
mountp:       c172f400  (xfs_mount)
callback:            0
flags:        4   perm_log_res
items_free:          c
items.next:          0
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:           1f
busy.next:           0
busy.free/unused     7fffffff 0

--
masano


<Prev in Thread] Current Thread [Next in Thread>