xfs: switch to use the new mount-api

Define the struct fs_parameter_spec table that's used by the new mount
api for options parsing.

Create the various fs context operations methods and define the
fs_context_operations struct.

Create the fs context initialization method and update the struct
file_system_type to utilize it. The initialization function is
responsible for working storage initialization, allocation and
initialization of file system private information storage and for
setting the operations in the fs context.

With the new mount api the options parsing and the filling of the super
block are done seperately. Becuase of this it's sometimes necessary to
communicate intermediate values between the options parsing and the
fill super functions.

Define struct xfs_fc_context that holds intermediate values set from the
passed options. The fields dsunit and dswidth depend on one another so
the checks and setting of struct xfs_mount fields drom them need to be
done after options parsing. The iosizelog field could be set in the
options parsing function but the check used before setting the struct
xfs_mount field is a little more than trivial and would reduce the
readabiliy of the options parsing function so it's also added to the
struct xfs_fc_context.

I could have moved the xfs_fs_remount() function up to be with the
other mount related code to try and highlight what actually changed
when converting it to xfs_fc_reconfigure(). But the function is fairly
short and the gain in patch readability didn't appear to be worth the
extra code churn.

Finally remove unused code.

And rename xfs_fs_fill_super() to xfs_fc_fill_super() for consistency.

Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 file changed