Re: [PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-22 Thread Wang Xiaoguang
hello, On 06/22/2016 02:24 PM, Christoph Hellwig wrote: On Wed, Jun 22, 2016 at 09:57:01AM +0800, Wang Xiaoguang wrote: And below test case can reveal this bug: Please wire this up for xfstests, thanks! OK. Regards, Xiaoguang Wang -- To unsubscribe from this list: send the line "unsub

Re: [PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-22 Thread Christoph Hellwig
On Wed, Jun 22, 2016 at 09:57:01AM +0800, Wang Xiaoguang wrote: > And below test case can reveal this bug: Please wire this up for xfstests, thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info a

[PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-21 Thread Wang Xiaoguang
When doing truncate operation, btrfs_setsize() will first call truncate_setsize() to set new inode->i_size, but if later btrfs_truncate() fails, btrfs_setsize() will call "i_size_write(inode, BTRFS_I(inode)->disk_i_size)" to reset the inmemory inode size, now bug occurs. It's because for truncate c