Re: [PATCH v6 10/12] xfs: move xfs_parseargs() validation to a helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-10-16 at 01:40 -0700, Christoph Hellwig wrote:
> On Wed, Oct 16, 2019 at 08:41:38AM +0800, Ian Kent wrote:
> > +static int
> > +xfs_validate_params(
> > +	struct xfs_mount        *mp,
> > +	int			dsunit,
> > +	int			dswidth,
> > +	uint8_t			iosizelog,
> > +	bool			nooptions)
> 
> Please add a refactor patch before this one to always set the stripe
> unit / width / log I/O size values in the mount structure at parsing
> time as suggested before.  The will also remove the need for the
> xfs_fs_context structure in the last patch.

With the mount api it looks like this means adding the validation
checks to xfs_parse_param().

That could be done for iosizelog without problem other than the check
being redone for each instance of the "allocsize" option which is
probably ok.

But the dsunit and dswidth checks depend on one another so that check
needs to be done after all the options have been handled.

After the change to use the mount api the options string separation
is done in the VFS and xfs_parse_param() called separately for each
option.

This is done so that the new system call fsconfig() can be implemented
which will call the .parse_param() method separately for each option
too.

So it isn't known if both "sunit" and "swidth" have been given until
aft
er all the options have been looked at.

Ian




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux