Received: with ECARTIS (v1.0.0; list linux-xfs); Sun, 17 Jul 2005 00:57:59 -0700 (PDT) Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.214]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j6H7vrH9022735 for ; Sun, 17 Jul 2005 00:57:53 -0700 Received: from mailgate3.nec.co.jp (mailgate54.nec.co.jp [10.7.69.195]) by tyo201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id j6H7u6E22896 for ; Sun, 17 Jul 2005 16:56:06 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id j6H7u6F24904 for linux-xfs@oss.sgi.com; Sun, 17 Jul 2005 16:56:06 +0900 (JST) Received: from secsv2.tnes.nec.co.jp (tnesvc1.tnes.nec.co.jp [10.1.101.14]) by mailsv3.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id j6H7u5L09945 for ; Sun, 17 Jul 2005 16:56:05 +0900 (JST) Received: from TNESVC1.tnes.nec.co.jp ([10.1.101.14]) by secsv2.tnes.nec.co.jp (ExpressMail 5.10) with SMTP id 20050717.165852.25803816 for ; Sun, 17 Jul 2005 16:58:52 +0900 Received: FROM noshiro.bsd.tnes.nec.co.jp BY TNESVC1.tnes.nec.co.jp ; Sun Jul 17 16:58:51 2005 +0900 Received: from localhost (localhost.localdomain [127.0.0.1]) by noshiro.bsd.tnes.nec.co.jp (Postfix) with ESMTP id 6DFF9749F6; Sun, 17 Jul 2005 16:55:49 +0900 (JST) Date: Sun, 17 Jul 2005 16:55:49 +0900 (JST) Message-Id: <20050717.165549.730551511.masano@tnes.nec.co.jp> To: lord@xfs.org Cc: linux-xfs@oss.sgi.com Subject: Re: deadlocks on ENOSPC From: ASANO Masahiro In-Reply-To: <42D7AA45.2040608@xfs.org> References: <20050715.150717.28782011.masano@tnes.nec.co.jp> <42D7AA45.2040608@xfs.org> X-Mailer: Mew version 3.3 on XEmacs 21.4.11 (Native Windows TTY Support) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 5656 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: masano@tnes.nec.co.jp Precedence: bulk X-list: linux-xfs Content-Length: 1734 Lines: 57 Hi Steve, From: Steve Lord 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