FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, ritesh.list@gmail.com,
	ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org,
	fdmanana@kernel.org
Subject: Re: [PATCH v3 2/4] generic/274: Make the pwrite block sizes and offsets to 64k
Date: Mon, 25 Aug 2025 11:37:40 +0530	[thread overview]
Message-ID: <5daa9269-ad7a-4f6b-ad75-432fa5271ecc@gmail.com> (raw)
In-Reply-To: <36395df3-bc41-44c0-861d-0f7f8c47a46d@gmx.com>


On 8/25/25 10:14, Qu Wenruo wrote:
>
>
> 在 2025/8/25 14:04, Nirjhar Roy (IBM) 写道:
>>
>> On 8/20/25 13:45, Nirjhar Roy (IBM) wrote:
>>> This test was written with 4k block size in mind and it fails with
>>> 64k block size when tested with btrfs.
>>> The test first does pre-allocation, then fills up the
>>> filesystem. After that it tries to fragment and fill holes at offsets
>>> of 4k(i.e, 1 fsblock) - which works fine with 4k block size, but with
>>> 64k block size, the test tries to fragment and fill holes within
>>> 1 fsblock(of size 64k). This results in overwrite of 64k fsblocks
>>> and the write fails. The reason for this failure is that during
>>> overwrite, there is no more space available for COW.
>>> Fix this by changing the pwrite block size and offsets to 64k
>>> so that the test never tries to punch holes or overwrite within 1 
>>> fsblock
>>> and the test becomes compatible with all block sizes.
>>>
>>> For non-COW filesystems/files, this test should work even if the
>>> underlying filesytem block size > 64k.
>>
>> Hi Qu,
>>
>> Do you have any other feedback for this? I have reverted the block 
>> size to 4k during fs filling as suggested in [1]
>
> With that changed I'm totally fine. Feel free to add my tag:
>
> Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks. Added the RBs, fixed some typos and sent the final [v4].


[v4] 
https://lore.kernel.org/all/cover.1756101620.git.nirjhar.roy.lists@gmail.com/

--NR

>
> Thanks,
> Qu
>>
>> [1] https://lore.kernel.org/all/0a10a9b0-a55c-4607- 
>> be0b-7f7f01c2d729@suse.com/
>>
>> --NR
>>
>>>
>>> Reported-by: Disha Goel <disgoel@linux.ibm.com>
>>> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
>>> ---
>>>   tests/generic/274 | 8 ++++----
>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/tests/generic/274 b/tests/generic/274
>>> index 916c7173..f6c7884e 100755
>>> --- a/tests/generic/274
>>> +++ b/tests/generic/274
>>> @@ -40,8 +40,8 @@ _scratch_unmount 2>/dev/null
>>>   _scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1
>>>   _scratch_mount
>>> -# Create a 4k file and Allocate 4M past EOF on that file
>>> -$XFS_IO_PROG -f -c "pwrite 0 4k" -c "falloc -k 4k 4m" $SCRATCH_MNT/ 
>>> test \
>>> +# Create a 64k file and Allocate 64M past EOF on that file
>>> +$XFS_IO_PROG -f -c "pwrite 0 64k" -c "falloc -k 64k 64m" 
>>> $SCRATCH_MNT/test \
>>>       >>$seqres.full 2>&1 || _fail "failed to create test file"
>>>   # Fill the rest of the fs completely
>>> @@ -63,7 +63,7 @@ df $SCRATCH_MNT >>$seqres.full 2>&1
>>>   echo "Fill in prealloc space; fragment at offsets:" >> $seqres.full
>>>   for i in `seq 1 2 1023`; do
>>>       echo -n "$i " >> $seqres.full
>>> -    dd if=/dev/zero of=$SCRATCH_MNT/test seek=$i bs=4K count=1 
>>> conv=notrunc \
>>> +    dd if=/dev/zero of=$SCRATCH_MNT/test seek=$i bs=64K count=1 
>>> conv=notrunc \
>>>           >>$seqres.full 2>/dev/null || _fail "failed to write to 
>>> test file"
>>>   done
>>>   _scratch_sync
>>> @@ -71,7 +71,7 @@ echo >> $seqres.full
>>>   echo "Fill in prealloc space; fill holes at offsets:" >> $seqres.full
>>>   for i in `seq 2 2 1023`; do
>>>       echo -n "$i " >> $seqres.full
>>> -    dd if=/dev/zero of=$SCRATCH_MNT/test seek=$i bs=4K count=1 
>>> conv=notrunc \
>>> +    dd if=/dev/zero of=$SCRATCH_MNT/test seek=$i bs=64K count=1 
>>> conv=notrunc \
>>>           >>$seqres.full 2>/dev/null || _fail "failed to fill test 
>>> file"
>>>   done
>>>   _scratch_sync
>>
>
-- 
Nirjhar Roy
Linux Kernel Developer
IBM, Bangalore


  reply	other threads:[~2025-08-25  6:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20  8:15 [PATCH v3 0/4] btrfs: Misc test fixes for large block/node sizes Nirjhar Roy (IBM)
2025-08-20  8:15 ` [PATCH v3 1/4] btrfs/301: Make the test compatible with all the supported block sizes Nirjhar Roy (IBM)
2025-08-22 14:19   ` Disha Goel
2025-08-20  8:15 ` [PATCH v3 2/4] generic/274: Make the pwrite block sizes and offsets to 64k Nirjhar Roy (IBM)
2025-08-22 14:25   ` Disha Goel
2025-08-25  4:34   ` Nirjhar Roy (IBM)
2025-08-25  4:44     ` Qu Wenruo
2025-08-25  6:07       ` Nirjhar Roy (IBM) [this message]
2025-08-20  8:15 ` [PATCH v3 3/4] btrfs/137: Make this test compatible with all supported block sizes Nirjhar Roy (IBM)
2025-08-22 14:27   ` Disha Goel
2025-08-20  8:15 ` [PATCH v3 4/4] generic/563: Increase the iosize to to cover for btrfs Nirjhar Roy (IBM)
2025-08-22 14:37   ` Disha Goel
2025-08-25  6:08     ` Nirjhar Roy (IBM)
2025-08-25  5:55 ` [PATCH v3 0/4] btrfs: Misc test fixes for large block/node sizes Ojaswin Mujoo
2025-08-25  6:08   ` Nirjhar Roy (IBM)

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=5daa9269-ad7a-4f6b-ad75-432fa5271ecc@gmail.com \
    --to=nirjhar.roy.lists@gmail.com \
    --cc=djwong@kernel.org \
    --cc=fdmanana@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=ritesh.list@gmail.com \
    --cc=zlang@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