Re: [PATCH] xfs: Add check for unsupported xflags

Darrick J. Wong
2020-09-02T17:45:38Z

On Wed, Sep 02, 2020 at 10:38:28AM -0700, Ira Weiny wrote:
> On Wed, Sep 02, 2020 at 10:03:26AM -0700, Darrick J. Wong wrote:
> > On Wed, Sep 02, 2020 at 01:11:00PM +0800, Xiao Yang wrote:
> > > Hi Darrick,
> > >
> > > It is reasonable for your concern to add a check in VFS, but checking all
> > > defined xflags is too rough in VFS if one filesystem only supports few
> > > xflags. :-)
> >
> > I was advocating for two levels of flags checks: one in the VFS for
> > undefined flags, and a second check in each filesystem for whichever
> > flag it wants to recognize. I was not implying that the VFS checks
> > would be sufficient on their own.
> >
>
> I've not really followed this thread completely but wouldn't this proposed
> check in the VFS layer be redundant because the set of flags the filesystem
> accepts should always be a strict subset of the VFS flags?

Yes. It's 100% CYA. I wouldn't be that bent out of shape if the vfs
part never happens, but as we already have a vfs argument checker
function in addition to the per-fs validation I don't see why we would
leave a gap... ;)

--D

> Ira