Re: [RFC] common: skip data write EIO tests on fatal configs
Christoph Hellwig <[email protected]> Thu, 18 Jun 2026 11:11:54 +0200
| Newsgroups | org.kernel.vger.fstests |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 18, 2026 at 11:47:56AM +0800, Yao Sang wrote:
> The auto detection is intentionally XFS-specific for now. It checks the XFS
> per-mount sysfs attribute zoned/max_open_zones, not the block layer
> /sys/block/.../queue/zoned attribute. A zoned block device alone does not
> prove that the mounted XFS instance is using zoned filesystem semantics.
Yeah, make sense.
> One test-number detail is worth calling out. The maintainer report first
> mentions generic/441 and xfs/665, but the following fserror/healthmon
> description refers to xfs/656. I checked both tests: xfs/656 is the dmerror
> plus healthmon data I/O error test and matches the reported failure; xfs/665 is
Sorry, I fat-fingered the number.
> +_scratch_data_write_eio_is_fatal()
> +{
> + local dev="${1:-$SCRATCH_DEV}"
I'll defer to Zorro, but normally either requiring an argument
always or neve seems nice. And my preference here would be to
always pass the device, and not have _scratch in the name.
> +
> + case "${FS_DATA_WRITE_EIO_SHUTDOWN:-auto}" in
> + yes|true|1)
> + return 0
> + ;;
> + no|false|0)
> + return 1
> + ;;
> + auto|"")
> + ;;
> + *)
> + _fail "invalid FS_DATA_WRITE_EIO_SHUTDOWN=$FS_DATA_WRITE_EIO_SHUTDOWN"
> + ;;
> + esac
I don't understand what this part is about at all.
> +
> + case "$FSTYP" in
> + xfs)
> + # This is an XFS per-mount sysfs attribute, not a block queue
> + # attribute. Its existence means XFS mounted this instance with
> + # zoned filesystem semantics.
> + _has_fs_sysfs_attr "$dev" "zoned/max_open_zones" && return 0
> + ;;
> + esac
> +
> + return 1
This part looks fine.
> +}
> +
> +# Require that data write errors are reported through the regular error
> +# reporting path instead of shutting down the filesystem.
> +_require_scratch_survives_data_write_errors()
> +{
> + local dev="${1:-$SCRATCH_DEV}"
> +
> + _scratch_data_write_eio_is_fatal "$dev" || return
> +
> + _notrun "$FSTYP treats data write errors as fatal"
> +}
Do we need both survives and fatal versions of this? Or decide
on one polarity and be done with it?