From: Anand Jain <anand.jain@oracle.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
Johannes Thumshirn <jth@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>,
"fstests@vger.kernel.org" <fstests@vger.kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] tests: btrfs/237: skip test on devices with conventional zones
Date: Thu, 14 Aug 2025 07:46:47 +0530 [thread overview]
Message-ID: <7004f11c-a84c-475f-8267-a815e43f7726@oracle.com> (raw)
In-Reply-To: <9e7e864c-fd3d-4d50-87da-b8ded6765b9a@wdc.com>
On 16/7/25 13:27, Johannes Thumshirn wrote:
> On 12.07.25 15:53, Anand Jain wrote:
>>> +$BLKZONE_PROG report $SCRATCH_DEV | grep -q -e "nw" && \
>>> + _notrun "test is unreliable on devices with conventional zones"
>>> +
>>> sdev="$(_short_dev $SCRATCH_DEV)"
>>> zone_size=$(($(cat /sys/block/${sdev}/queue/chunk_sectors) << 9))
>>> fssize=$((zone_size * 16))
>>
>> Johannes,
>>
>> The test case still fails on a zone device with no conventional zones.
>> However, if we use tail -1, it works fine—with or without a
>> conventional zone.
>>
>
> But if the data is placed in a conventional zone and we recalim it, the
> write pointer will not be reset (as there is none) and you'll still see:
>
> -Silence is golden
> +Old wptr still at 0x073338
>
>> $ modprobe scsi_debug zbc=host-managed zone_size_mb=256 zone_cap_mb=256
>> zone_nr_conv=0 dev_size_mb=4096 num_tgts=2
>>
>> $ ./check btrfs/237
>> ::
>> btrfs/237 5s ... [failed, exit status 1]- output mismatch (see
>> /Volumes/work/ws/fstests/results//btrfs/237.out.bad)
>> --- tests/btrfs/237.out 2025-07-01 17:41:30.943699725 +0800
>> +++ /Volumes/work/ws/fstests/results//btrfs/237.out.bad 2025-07-12
>> 21:39:03.756275219 +0800
>> @@ -1,2 +1,3 @@
>> QA output created by 237
>> -Silence is golden
>> +Old wptr still at 0x073338
>> +(see /Volumes/work/ws/fstests/results//btrfs/237.full for details)
>>
>>
>> Following diff fixes the issue.
>>
>> -----
>> index 2839f6e42797..7f460c1415bc 100755
>> --- a/tests/btrfs/237
>> +++ b/tests/btrfs/237
>> @@ -28,7 +28,8 @@ get_data_bg()
>> {
>> $BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK
>> $SCRATCH_DEV |\
>> grep -A 1 "CHUNK_ITEM" | grep -B 1 "type DATA" |\
>> - grep -Eo "CHUNK_ITEM [[:digit:]]+" | cut -d ' ' -f 2
>> + grep -Eo "CHUNK_ITEM [[:digit:]]+" | cut -d ' ' -f 2 |\
>> + tail -1
>> }
>>
>> get_data_bg_physical()
>> @@ -36,7 +37,8 @@ get_data_bg_physical()
>> # Assumes SINGLE data profile
>> $BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK
>> $SCRATCH_DEV |\
>> grep -A 4 CHUNK_ITEM | grep -A 3 'type DATA\|SINGLE' |\
>> - grep -Eo 'offset [[:digit:]]+'| cut -d ' ' -f 2
>> + grep -Eo 'offset [[:digit:]]+'| cut -d ' ' -f 2 |\
>> + tail -1
>> }
>
> Oh OK, then tail vs head it is. Still there shouldn't be more than one,
> IMHO.
Yeah.. for now it should be fine. Are you sending a v2 for this?
Thanks, Anand
prev parent reply other threads:[~2025-08-14 2:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 13:18 [PATCH] tests: btrfs/237: skip test on devices with conventional zones Johannes Thumshirn
2025-07-12 13:52 ` Anand Jain
2025-07-16 7:57 ` Johannes Thumshirn
2025-08-14 2:16 ` Anand Jain [this message]
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=7004f11c-a84c-475f-8267-a815e43f7726@oracle.com \
--to=anand.jain@oracle.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=fstests@vger.kernel.org \
--cc=jth@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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