Skip to content

Commit 6b00475

Browse files
johnpgarrykawasaki
authored andcommitted
common/xfs: fix run_xfs_io_xstat for max atomics
When trying to find the value for max atomic write size, a user of run_xfs_io_xstat calls something like the following: statx_atomic_min=$(run_xfs_io_xstat /dev/"$md_dev" "stat.atomic_write_unit_max") And run_xfs_io_xstat will grep for "stat.atomic_write_unit_max" in the raw statx output. However, since new field "stat.atomic_write_unit_max_opt" was added for statx, the grep returns 2x values (which is wrong). Fix by changing the grep to cover the full field name. This fixes md/002, nvme/059, and scsi/009. Signed-off-by: John Garry <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent b4469a5 commit 6b00475

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/xfs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ run_xfs_io_xstat() {
134134
local statx_output
135135

136136
statx_output=$(xfs_io -c "statx -r -m 0x00010000" "$dev" | \
137-
grep "$field" | awk '{ print $3 }')
137+
grep "$field =" | awk '{ print $3 }')
138138
echo "$statx_output"
139139
}

0 commit comments

Comments
 (0)