From: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
To: fstests@vger.kernel.org
Subject: Re: [PATCH v2] geceric/362: check truncate can update file size correctly when truncate fails
Date: Fri, 1 Jul 2016 15:05:41 +0800 [thread overview]
Message-ID: <57761645.5060806@cn.fujitsu.com> (raw)
In-Reply-To: <20160701025523.GN23649@eguan.usersys.redhat.com>
hello,
On 07/01/2016 10:55 AM, Eryu Guan wrote:
> On Fri, Jul 01, 2016 at 10:28:28AM +0800, Wang Xiaoguang wrote:
>> hello,
>>
>> On 06/30/2016 09:52 PM, Eryu Guan wrote:
>>> On Thu, Jun 30, 2016 at 04:25:49PM +0800, Wang Xiaoguang wrote:
>>>> In btrfs, when truncate operation fails for enospc reason, file may still
>>>> have some disk blocks, but it will fail to update filesize accordingly.
>>>>
>>>> Kernel commit c0d2f61 has fixed this bug for btrfs:
>>>> btrfs: fix disk_i_size update bug when ftruncate() fails
>>>>
>>>> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
>>>> ---
>>>> v2: move this test to generic test and add comments why testcase
>>>> use reflink.
>>> Thanks for the updated version. Did it fail for you when testing on
>>> unpatched kernel? I ran the test more than 10 times on 4.6 kernel (which
>>> doesn't have the fix) and all passed, as well as RHEL7 kernel.
>>>
>>> Can you please confirm?
>> I tested this case in v4.6-rc7-162-g415b35a and it failed as expected,
>> but I used the newest version btrfs-progs.
>> In RHEL7.2ga, its btrfs-progs version is btrfs-progs-3.19.1-1.el7.x86_64,
>> which is somewhat old. For small fs, it'll enable mixed mode for data and
>> metadata default, so the reflink operation in this test case does not
>> consume
>> enough metadata, truncate operation can still succeed, then test will always
>> pass. I can create a big fs to have test, but then this fs will have more
>> metadata, which then need more reflink operations to consume metadata and
>> increase the test time greatly.
>>
>> In mkfs.btrfs manpage, there is such description:
>> versions up to 4.2.x forced the mixed mode for devices smaller
>> than 1GiB. This has been removed in 4.3+ as it caused some
>> usability issues.
> I also tested on 4.6 kernel with v4.6 btrfs-progs, it passed 10+ times
> without a fail. I was testing on a 4vcpu kvm guest with 8G memory,
> TEST_DEV and SCRATCH_DEV are all 15G in size, not sure if that matters.
Sorry, I run this test case in v4.6, it still failed.
Would you please give me your kernel version and btrfs-progs version,
like this format: v4.6-rc7-162-g415b35a, which is generated by "describe",
then I can do some further investigation, thanks.
Regards,
Xiaoguang Wang
>
> Thanks,
> Eryu
>
>
next prev parent reply other threads:[~2016-07-01 7:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 7:36 [PATCH] btrfs: check truncate can update file size correctly when truncate fails Wang Xiaoguang
2016-06-23 8:27 ` Eryu Guan
2016-06-29 3:22 ` Wang Xiaoguang
2016-06-30 8:25 ` [PATCH v2] geceric/362: " Wang Xiaoguang
2016-06-30 13:52 ` Eryu Guan
2016-07-01 1:25 ` Wang Xiaoguang
2016-07-01 2:28 ` Wang Xiaoguang
2016-07-01 2:55 ` Eryu Guan
2016-07-01 7:05 ` Wang Xiaoguang [this message]
2016-07-01 7:32 ` Eryu Guan
2016-06-23 9:15 ` [PATCH] btrfs: " Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57761645.5060806@cn.fujitsu.com \
--to=wangxg.fnst@cn.fujitsu.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox