Re: [PATCH] xfs: fix broken error handling in xfs_vm_writepage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 12, 2012 at 11:49:10AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> When we shut down the filesystem, it might first be detected in
> writeback when we are allocating a inode size transaction. This
> happens after we have moved all the pages into the writeback state
> and unlocked them. Unfortunately, if we fail to set up the
> transaction we then abort writeback and try to invalidate the
> current page. This then triggers are BUG() in block_invalidatepage()
> because we are trying to invalidate an unlocked page.

FWIW, I found this problem when testing recovery of wrapped log
buffers. The test:

$ cat t.sh
#!/bin/bash

while [ 1 ]; do
        mkfs.xfs -f /dev/vdb > /dev/null 2>&1
        mount /dev/vdb /mnt/scratch
        ./compilebench -D /mnt/scratch > /dev/null 2>&1 &
        sleep 36
        /home/dave/src/xfstests-dev/src/godown /mnt/scratch
        sleep 5
        umount /mnt/scratch
        xfs_logprint -d /dev/vdb |grep -B 1 "^\["
        mount /dev/vdb /mnt/scratch
        umount /mnt/scratch
done

would fail after 3-4 iterations due to the BUG() in
block_invalidatepage().  This fix has been running that loop for 2
hours now, so it's gone through over a hundred iterations without
failing now - it takes about 45s an iteration to run. Note that this
is also exercising the wrapped log buffer recovery fix on every
iteration, too.... :)

And FWIW, this probably should have a cc: <stable@xxxxxxxxxxxxxxx>
on it as well, as it is a recent regression that turns a shutdown
into hard failure....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux