| To: | lachlan@xxxxxxx |
|---|---|
| Subject: | Re: [PATCH] Move vn_iowait() earlier in the reclaim path |
| From: | Lachlan McIlroy <lachlan@xxxxxxx> |
| Date: | Fri, 08 Aug 2008 18:32:01 +1000 |
| Cc: | xfs@xxxxxxxxxxx, xfs-dev <xfs-dev@xxxxxxx> |
| In-reply-to: | <489AB596.1010505@sgi.com> |
| References: | <4897F691.6010806@sgi.com> <20080805073711.GA21635@disturbed> <489806C2.7020200@sgi.com> <20080805084220.GF21635@disturbed> <48990C4E.9070102@sgi.com> <20080806052053.GU6119@disturbed> <4899406D.5020802@sgi.com> <20080806093844.GZ6119@disturbed> <489AB596.1010505@sgi.com> |
| Reply-to: | lachlan@xxxxxxx |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Thunderbird 2.0.0.16 (X11/20080707) |
Lachlan McIlroy wrote:
Dave Chinner wrote:On Wed, Aug 06, 2008 at 04:10:53PM +1000, Lachlan McIlroy wrote:Dave Chinner wrote:On Wed, Aug 06, 2008 at 12:28:30PM +1000, Lachlan McIlroy wrote:Dave Chinner wrote:On Tue, Aug 05, 2008 at 05:52:34PM +1000, Lachlan McIlroy wrote:Dave Chinner wrote:On Tue, Aug 05, 2008 at 04:43:29PM +1000, Lachlan McIlroy wrote:Currently by the time we get to vn_iowait() in xfs_reclaim() we have alreadyxfs_free()? What's that?
The stacktrace from kdb has no arguments so I added a printk to give us the key items. inode->i_size, ip->i_size, ip->i_new_size and ip->i_d.di_size are all zero ip->i_iocount is 1 inode->i_mode is valid but ip->i_d.di_mode is zero This assert triggered when the filesystem became full. I suspect that a direct I/O write failed due to ENOSPC (and that's why the file size is still zero) but the ioend still got queued. <5>XFS mounting filesystem dm-0 <7>Ending clean XFS mount for filesystem: dm-0 <7>xfs_setfilesize: ip 0xffff810fd3920c90, inode 0xffff810fd391fc18, iocount 1, ioend 0xffff810f96059be8 <4>Assertion failed: (ip->i_d.di_mode & S_IFMT) == S_IFREG, file: fs/xfs/linux-2.6/xfs_aops.c, line: 180 <0>------------[ cut here ]------------ <2>kernel BUG at fs/xfs/support/debug.c:81! [1]kdb> [1]kdb> [1]kdb> xnode 0xffff810fd3920c90, mount 0xffff81101acc0488 mnext 0xffff810f8e54c670 mprev 0xffff810f5b90a050 vnode 0xffff810fd391fc18 dev fe00000 ino 4048200[7:5c54:8] blkno 0x1ee2a0 len 0x10 boffset 0x800 transp 0x0000000000000000 &itemp 0xffff810f32236240 &lock 0xffff810fd3920d40 &iolock 0xffff810fd3920da8 &flush 0xffff810fd3920e10 (1) pincount 0x0 udquotp 0x0000000000000000 gdquotp 0x0000000000000000 new_size 0 flags 0x0 <> update_core 0 update size 0 gen 0x0 delayed blks 0size 0 trace 0xffff810fcc693620 bmap_trace 0xffff810fcc6935f0 bmbt trace 0xffff810fcc6935c0 rw trace 0xffff810fcc693590 ilock trace 0xffff810fcc693560 dir trace 0xffff810fcc693530 data fork bytes 0x0 real_bytes 0x0 lastex 0x0 u1:extents 0x0000000000000000 broot 0x0000000000000000 broot_bytes 0x0 ext_max 9 flags 0x2 <extents > u2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 attr fork empty [1]more> magic 0x494e mode 00 (?------------) version 0x2 format 0x2 (extents) nlink 0 uid 0 gid 0 projid 0 flushiter 0 atime 1218176355:126020521 mtime 1218176355d:554017996 ctime 1218176355:554017996 size 0 nblocks 0 extsize 0x0 nextents 0x0 anextents 0x0 forkoff 0 aformat 0x2 (extents) dmevmask 0x0 dmstate 0x0 flags 0x0 <> gen 0x593e66c8 --> itrace @ 0xffff810fd3920c90/0xffff810fcc693620 ref @fs/xfs/xfs_vnodeops.c:1589(xfs_create+0x390) i_count = 1 cpu = 6 pid = 9502 ra = xfs_vn_mknod+0x144 hold @fs/xfs/xfs_vnodeops.c:1642(xfs_create+0x568) i_count 1 => 2 cpu = 6 pid = 9502 ra = xfs_vn_mknod+0x144 entry to xfs_iput i_count = 2 cpu = 6 pid = 9502 ra = xfs_trans_unlock_chunk+0x77 rele @fs/xfs/xfs_iget.c:421(xfs_iput+0x42) i_count 2 => 1 cpu = 6 pid = 9502 ra = xfs_trans_unlock_chunk+0x77 entry to xfs_vn_getattr i_count = 1 cpu = 1 pid = 9502 ra = vfs_fstat+0x29 entry to xfs_vn_getattr i_count = 1 cpu = 1 pid = 9502 ra = vfs_fstat+0x29 entry to xfs_ioctl i_count = 1 cpu = 1 pid = 9502 ra = xfs_file_ioctl+0x26 entry to xfs_vn_getattr i_count = 1 cpu = 1 pid = 9502 ra = vfs_fstat+0x29 [1]more> entry to xfs_remove i_count = 2 cpu = 1 pid = 9502 ra = xfs_vn_unlink+0x37 hold @fs/xfs/xfs_vnodeops.c:1958(xfs_remove+0x26d) i_count 2 => 3 cpu = 1 pid = 9502 ra = xfs_vn_unlink+0x37 entry to xfs_iput i_count = 3 cpu = 1 pid = 9502 ra = xfs_trans_unlock_chunk+0x77 rele @fs/xfs/xfs_iget.c:421(xfs_iput+0x42) i_count 3 => 2 cpu = 1 pid = 9502 ra = xfs_trans_unlock_chunk+0x77 exit from xfs_remove i_count = 2 cpu = 1 pid = 9502 ra = xfs_vn_unlink+0x37 entry to xfs_fs_clear_inode i_count = 0 cpu = 1 pid = 9502 ra = clear_inode+0x9c entry to xfs_inactive i_count = 0 cpu = 1 pid = 9502 ra = xfs_fs_clear_inode+0xbd entry to xfs_reclaim i_count = 0 cpu = 1 pid = 9502 ra = xfs_fs_clear_inode+0xde [1]kdb> inode 0xffff810fd391fc18 struct inode at 0xffff810fd391fc18 i_ino = 4048200 i_count = 0 i_size 0 i_mode = 0100666 i_nlink = 0 i_rdev = 0x0 i_hash.nxt = 0x0000000000000000 i_hash.pprev = 0xffffc20005712980 i_list.nxt = 0xffff810fd391fc18 i_list.prv = 0xffff810fd391fc18 i_dentry.nxt = 0xffff810fd391fbb0 i_dentry.prv = 0xffff810fd391fbb0 i_sb = 0xffff810f1ca10148 i_op = 0xffffffff80690e20 i_data = 0xffff810fd391fe00 nrpages = 0 i_fop= 0xffffffff80690b40 i_flock = 0x0000000000000000 i_mapping = 0xffff810fd391fe00 i_flags 0x0 i_state 0x21 [I_DIRTY_SYNC I_FREEING] fs specific info @ 0xffff810fd391ffe8 [1]kdb> [1]kdb> md8c20 0xffff810f96059be8 0xffff810f96059be8 0000000000000000 0000000000000020 ........ ....... 0xffff810f96059bf8 5a5a5a5a00000000 ffff810fd391fc18 ....ZZZZ........ 0xffff810f96059c08 0000000000000000 0000000000000000 ................ 0xffff810f96059c18 0000000000001800 000000000002f800 ................ 0xffff810f96059c28 ffff8110270654d0 ffff810f96059c30 .T.'....0....... 0xffff810f96059c38 ffff810f96059c30 ffffffff803b0b69 0.......i.;..... 0xffff810f96059c48 ffffffff80b7f698 0000000000000000 ................ 0xffff810f96059c58 ffffffff807c0b92 d84156c5635688c0 ..|.......Vc.VA. 0xffff810f96059c68 ffffffff8025c2b6 09f911029d74e35b ..%.....[.t..... 0xffff810f96059c78 6b6b6b6b6b6b6b6b 6b6b6b6b6b6b6b6b kkkkkkkkkkkkkkkk [1]kdb> bt Stack traceback for pid 379 0xffff811029484680 379 2 1 1 R 0xffff8110294849c8 *xfsdatad/1 sp ip Function (args) 0xffff81102708be28 0xffffffff803bbf40 assfail+0x1a (invalid, invalid, invalid) kdb_bb: address 0x0000000000010286 not recognised Using old style backtrace, unreliable with no arguments sp ip Function (args) 0xffff81102708bdb8 0xffffffff803b0b69 xfs_end_bio_written 0xffff81102708be28 0xffffffff803bbf40 assfail+0x1a 0xffff81102708be58 0xffffffff803b0a50 xfs_setfilesize+0x6a 0xffff81102708be78 0xffffffff803b0b79 xfs_end_bio_written+0x10 0xffff81102708be88 0xffffffff8023bb02 run_workqueue+0xdf 0xffff81102708bed8 0xffffffff8023c5bd worker_thread+0xd8 0xffff81102708bef0 0xffffffff8023ef6e autoremove_wake_function 0xffff81102708bf20 0xffffffff8023c4e5 worker_thread 0xffff81102708bf28 0xffffffff8023ee5c kthread+0x47 0xffff81102708bf30 0xffffffff802294a8 schedule_tail+0x27 0xffff81102708bf48 0xffffffff8020bea8 child_rip+0xa
--- fs/xfs/xfs_inode.c_1.518 2008-08-08 17:31:02.000000000 +1000
+++ fs/xfs/xfs_inode.c 2008-08-08 17:35:11.000000000 +1000
@@ -1414,7 +1414,7 @@ xfs_itruncate_start(
mp = ip->i_mount; /* wait for the completion of any pending DIOs */
- if (new_size < ip->i_size)
+ if (new_size == 0 || new_size < ip->i_size)
vn_iowait(ip);/* and so far so good. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: TAKE 981498 - use KM_MAYFAIL in xfs_mountfs, Bhagi rathi |
|---|---|
| Next by Date: | Your message to Milis awaits moderator approval, milis-bounces |
| Previous by Thread: | Re: [PATCH] Move vn_iowait() earlier in the reclaim path, Lachlan McIlroy |
| Next by Thread: | [PATCH] Use KM_NOFS for debug trace buffers, Lachlan McIlroy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |