Re: [PATCH blktests v3] md/002: add atomic write tests for md/stacked devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 10, 2025 / 10:38, alan.adamson@xxxxxxxxxx wrote:
...
> Oops, md_chunk_size is in kbs.  Should be in bytes.
> 
> 
> diff --git a/tests/md/002 b/tests/md/002
> index 79c0d15..79f260b 100755
> --- a/tests/md/002
> +++ b/tests/md/002
> @@ -29,6 +29,7 @@ test() {
>         local md_sysfs_max_hw_sectors_kb
>         local md_max_hw_bytes
>         local md_chunk_size
> +       local md_chunk_size_bytes
>         local md_sysfs_logical_block_size
>         local md_sysfs_atomic_max_bytes
>         local md_sysfs_atomic_unit_max_bytes
> @@ -226,13 +227,14 @@ test() {
>                         md_dev=$(readlink /dev/md/blktests_md | sed
> 's|\.\./||')
> md_dev_sysfs="/sys/devices/virtual/block/${md_dev}"
>                         md_sysfs_atomic_unit_max_bytes=$(<
> "${md_dev_sysfs}"/queue/atomic_write_unit_max_bytes)
> +                       md_chunk_size_bytes=$(( "$md_chunk_size" * 1024))
>                         test_desc="TEST 12 RAID $raid_level - Verify chunk
> size "
> -                       if [ "$md_chunk_size" -le
> "$md_sysfs_atomic_unit_max_bytes" ] && \
> -                                  (( md_sysfs_atomic_unit_max_bytes %
> md_chunk_size == 0 ))
> +                       if [ "$md_chunk_size_bytes" -le
> "$md_sysfs_atomic_unit_max_bytes" ] && \
> +                                  (( md_sysfs_atomic_unit_max_bytes %
> md_chunk_size_bytes == 0 ))
>                         then
>                                 echo "$test_desc - pass"
>                         else
> -                               echo "$test_desc - fail $md_chunk_size -
> $md_sysfs_atomic_unit_max_bytes"
> +                               echo "$test_desc - fail $md_chunk_size_bytes
> - $md_sysfs_atomic_unit_max_bytes"
>                         fi
> 
>                         mdadm --quiet --stop /dev/md/blktests_md
> 

Nice catch, I will reflect this fix and send out v4 soon.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux