Re: [PATCH] btrfs: fix false enospc error when truncating heavily reflinked file

2017-01-05 Thread David Sterba
On Wed, Jan 04, 2017 at 03:52:47PM +0800, Qu Wenruo wrote: > Any comment on this patch? > > Without it, btrfs will always fail for generic/387. The fix looks good to me, adding it to next. There's a very similar pattern in btrfs_punch_hole, but this function uses the trans reserve and not

Re: [PATCH] btrfs: fix false enospc error when truncating heavily reflinked file

2017-01-03 Thread Qu Wenruo
Hi, Any comment on this patch? Without it, btrfs will always fail for generic/387. Thanks, Qu At 09/07/2016 08:17 PM, Wang Xiaoguang wrote: Below test script can reveal this bug: dd if=/dev/zero of=fs.img bs=$((1024*1024)) count=100 dev=$(losetup --show -f fs.img) mkdir -p

Re: [PATCH] btrfs: fix false enospc error when truncating heavily reflinked file

2016-09-07 Thread Wang Xiaoguang
Hi, On 09/07/2016 11:56 PM, Darrick J. Wong wrote: On Wed, Sep 07, 2016 at 08:17:38PM +0800, Wang Xiaoguang wrote: Below test script can reveal this bug: dd if=/dev/zero of=fs.img bs=$((1024*1024)) count=100 dev=$(losetup --show -f fs.img) mkdir -p /mnt/mntpoint mkfs.btrfs

Re: [PATCH] btrfs: fix false enospc error when truncating heavily reflinked file

2016-09-07 Thread Darrick J. Wong
On Wed, Sep 07, 2016 at 08:17:38PM +0800, Wang Xiaoguang wrote: > Below test script can reveal this bug: > dd if=/dev/zero of=fs.img bs=$((1024*1024)) count=100 > dev=$(losetup --show -f fs.img) > mkdir -p /mnt/mntpoint > mkfs.btrfs -f $dev > mount $dev /mnt/mntpoint > cd

[PATCH] btrfs: fix false enospc error when truncating heavily reflinked file

2016-09-07 Thread Wang Xiaoguang
Below test script can reveal this bug: dd if=/dev/zero of=fs.img bs=$((1024*1024)) count=100 dev=$(losetup --show -f fs.img) mkdir -p /mnt/mntpoint mkfs.btrfs -f $dev mount $dev /mnt/mntpoint cd /mnt/mntpoint echo "workdir is: /mnt/mntpoint" blocksize=$((128 *