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

Christoph Hellwig
2026-03-03T16:53:14Z

On Tue, Mar 03, 2026 at 08:49:01AM -0800, Darrick J. Wong wrote:
> > > +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/
>
> Ok. I'm not sure how to check for feature support on ext4 anymore since
> the uevents patch didn't get merged, and then I clearly forgot to rip
> that out of this helper here.

Oh. Well, drop that then and move the xfs side and the default n
into a common helper instead of hardcoding it in the test.

> > 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.
>
> I think it's theoretically possible to figure out that there's a zone
> size and then round outwards the error-target part of the dm table to
> align with a zone.

It's the sysfs chunk size. btrfs/237 harcodes reading that out,
which could be easily lifted into a helper.

> I have a lot more doubts about whether or not doing
> that in bash/awk is a good idea though. It'd be a lot easier if either
> the block layer did error injection or if someone just fixes those
> limitations in dm itself.

I'll sign up to do the block layer stuff. Doing so should allow us
to run a lot more of the error injetion tests on zoned xfs, which
would be good. So I guess you should keep it as-is for now,
and I'll do a sweep later.