]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cancel the setfilesize transation when io error happen
authorZhaohongjiang <zhaohongjiang@huawei.com>
Mon, 12 Oct 2015 04:28:39 +0000 (15:28 +1100)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 31 Oct 2016 00:03:54 +0000 (17:03 -0700)
commit6f32ef31ecf4f233475d5f1bc30eb919a50789dd
tree60c213bbfc3c09046ef42b44e981f1331a22e146
parentceec3538230a7b07daf52b091fb2fb9712059f23
cancel the setfilesize transation when io error happen

When I ran xfstest/073 case, the remount process was blocked to wait
transactions to be zero. I found there was a io error happened, and
the setfilesize transaction was not released properly. We should add
the changes to cancel the io error in this case.

Reproduction steps:
1. dd if=/dev/zero of=xfs1.img bs=1M count=2048
2. mkfs.xfs xfs1.img
3. losetup -f ./xfs1.img /dev/loop0
4. mount -t xfs /dev/loop0 /home/test_dir/
5. mkdir /home/test_dir/test
6. mkfs.xfs -dfile,name=image,size=2g
7. mount -t xfs -o loop image /home/test_dir/test
8. cp a file bigger than 2g to /home/test_dir/test
9. mount -t xfs -o remount,ro /home/test_dir/test

[ dchinner: moved io error detection to xfs_setfilesize_ioend() after
  transaction context restoration. ]

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Orabug: 24385189
mainline commit: 5cb13dcd0fac071b45c4bebe1801a08ff0d89cad

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
fs/xfs/xfs_aops.c