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

Darrick J. Wong
2026-03-03T16:38:29Z

On Tue, Mar 03, 2026 at 08:12:55AM -0800, Christoph Hellwig wrote:
> On Tue, Mar 03, 2026 at 11:06:52AM -0500, Gabriel Krisman Bertazi wrote:
> > Christoph Hellwig <hch@infradead.org> writes:
> >
> > >> +// SPDX-License-Identifier: GPL-2.0
> > >> +/*
> > >> + * Copyright 2021, Collabora Ltd.
> > >> + */
> > >
> > > Where is this coming from?
> >
> > This code is heavily based, if not the same, to what I originally wrote
> > as a kernel tree "samples/fs-monitor.c" when I was employed by
> > Collabora. I appreciate Darrick keeping the note actually.
>
> The note is good. But if we import code from somewhere, we should
> document where it is coming from, both for attribution and to ease
> any future resyncs if needed.

Yeah, I copied this straight from the kernel tree, which is why it
contains this wart:

> > >> +#ifndef __GLIBC__
> > >> +#include <asm-generic/int-ll64.h>
> > >> +#endif
> > >
> > > And what is this for? Looks pretty whacky.
> >
> > Comes from kernel commit 3193e8942fc7 ("samples: fix building fs-monitor
> > on musl systems") to fix building with musl. We don't need it here.
>
> In the place that needs it it really should have a comment explainig
> the logic behind it.

I don't know that people *don't* try to run fstests with musl. But as
they seem surprisingly patient with continuously fixing up xfsprogs,
perhaps it's ok to clean this up on the way into fstests.

I'll add more attribution for the c file pointing back to where it came
from.

--D