Re: [PATCH 1/1] generic: test fsnotify filesystem error reporting

Christoph Hellwig
2026-03-03T14:54:30Z

> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright 2021, Collabora Ltd.
> + */

Where is this coming from?

> +#ifndef __GLIBC__
> +#include <asm-generic/int-ll64.h>
> +#endif

And what is this for? Looks pretty whacky.

> +case "$FSTYP" in
> +xfs)
> + # added as a part of xfs health monitoring
> + _require_xfs_io_command healthmon
> + # no out of place writes
> + _require_no_xfs_always_cow
> + ;;
> +ext4)
> + # added at the same time as uevents
> + modprobe fs-$FSTYP
> + test -e /sys/fs/ext4/features/uevents || \
> + _notrun "$FSTYP does not support fsnotify ioerrors"
> + ;;
> +*)
> + _notrun "$FSTYP does not support fsnotify ioerrors"
> + ;;
> +esac

Please abstract this out into a documented helper in common/

> +#
> +# The dm-error map added by this test doesn't work on zoned devices because
> +# table sizes need to be aligned to the zone size, and even for zoned on
> +# conventional this test will get confused because of the internal RT device.
> +#
> +# That check requires a mounted file system, so do a dummy mount before setting
> +# up DM.
> +#
> +_scratch_mount
> +test $FSTYP = xfs && _require_xfs_scratch_non_zoned
> +_scratch_unmount

Hmm, this is a bit sad. Can we align the map? Or should we carve in
and add proper error injection to the block code, which has been
somewhere on my todo list forever because dm-error and friends are
so painful to setup. Maybe I need to expedite that.