On Jul 08, 2025 / 14:40, alan.adamson@xxxxxxxxxx wrote: > > On 7/8/25 7:36 AM, John Garry wrote: > > > > Just a small comment, but regardless of that. > > > > Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx> > > > > > + > > > + 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) > > > + test_desc="TEST 12 RAID $raid_level - Verify > > > sysfs_atomic_unit_max_bytes <= chunk size " > > > + if [ "$md_chunk_size" -le > > > "$md_sysfs_atomic_unit_max_bytes" ] > > > > you should also test that md_sysfs_atomic_unit_max_bytes is evenly > > divisible into md_chunk_size > > > > > We could do: > > diff --git a/tests/md/002 b/tests/md/002 > index e586daf..215d672 100755 > --- a/tests/md/002 > +++ b/tests/md/002 > @@ -226,8 +226,10 @@ 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) > - test_desc="TEST 12 RAID $raid_level - Verify > sysfs_atomic_unit_max_bytes <= chunk size " > - if [ "$md_chunk_size" -le > "$md_sysfs_atomic_unit_max_bytes" ] > + 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 )) '$'s for variables are not required in (( )) arithmetic operation. Let's remove them to make shellcheck happy. Other than that the suggested change looks good to me. I folded the change into the patch and posted v3.