xfs: rename variable mp to parsing_mp
Rename mp variable to parsisng_mp so it is easy to distinguish between current mount point handle and handle for mount point which mount options are being parsed. Suggested-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Pavel Reichl <preichl@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
parent
3fef46fc43
commit
0f98b4ece1
|
@ -1136,7 +1136,7 @@ xfs_fs_parse_param(
|
||||||
struct fs_context *fc,
|
struct fs_context *fc,
|
||||||
struct fs_parameter *param)
|
struct fs_parameter *param)
|
||||||
{
|
{
|
||||||
struct xfs_mount *mp = fc->s_fs_info;
|
struct xfs_mount *parsing_mp = fc->s_fs_info;
|
||||||
struct fs_parse_result result;
|
struct fs_parse_result result;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int opt;
|
int opt;
|
||||||
|
@ -1147,142 +1147,142 @@ xfs_fs_parse_param(
|
||||||
|
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case Opt_logbufs:
|
case Opt_logbufs:
|
||||||
mp->m_logbufs = result.uint_32;
|
parsing_mp->m_logbufs = result.uint_32;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_logbsize:
|
case Opt_logbsize:
|
||||||
if (suffix_kstrtoint(param->string, 10, &mp->m_logbsize))
|
if (suffix_kstrtoint(param->string, 10, &parsing_mp->m_logbsize))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_logdev:
|
case Opt_logdev:
|
||||||
kfree(mp->m_logname);
|
kfree(parsing_mp->m_logname);
|
||||||
mp->m_logname = kstrdup(param->string, GFP_KERNEL);
|
parsing_mp->m_logname = kstrdup(param->string, GFP_KERNEL);
|
||||||
if (!mp->m_logname)
|
if (!parsing_mp->m_logname)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_rtdev:
|
case Opt_rtdev:
|
||||||
kfree(mp->m_rtname);
|
kfree(parsing_mp->m_rtname);
|
||||||
mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
|
parsing_mp->m_rtname = kstrdup(param->string, GFP_KERNEL);
|
||||||
if (!mp->m_rtname)
|
if (!parsing_mp->m_rtname)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_allocsize:
|
case Opt_allocsize:
|
||||||
if (suffix_kstrtoint(param->string, 10, &size))
|
if (suffix_kstrtoint(param->string, 10, &size))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
mp->m_allocsize_log = ffs(size) - 1;
|
parsing_mp->m_allocsize_log = ffs(size) - 1;
|
||||||
mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
|
parsing_mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_grpid:
|
case Opt_grpid:
|
||||||
case Opt_bsdgroups:
|
case Opt_bsdgroups:
|
||||||
mp->m_flags |= XFS_MOUNT_GRPID;
|
parsing_mp->m_flags |= XFS_MOUNT_GRPID;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_nogrpid:
|
case Opt_nogrpid:
|
||||||
case Opt_sysvgroups:
|
case Opt_sysvgroups:
|
||||||
mp->m_flags &= ~XFS_MOUNT_GRPID;
|
parsing_mp->m_flags &= ~XFS_MOUNT_GRPID;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_wsync:
|
case Opt_wsync:
|
||||||
mp->m_flags |= XFS_MOUNT_WSYNC;
|
parsing_mp->m_flags |= XFS_MOUNT_WSYNC;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_norecovery:
|
case Opt_norecovery:
|
||||||
mp->m_flags |= XFS_MOUNT_NORECOVERY;
|
parsing_mp->m_flags |= XFS_MOUNT_NORECOVERY;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_noalign:
|
case Opt_noalign:
|
||||||
mp->m_flags |= XFS_MOUNT_NOALIGN;
|
parsing_mp->m_flags |= XFS_MOUNT_NOALIGN;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_swalloc:
|
case Opt_swalloc:
|
||||||
mp->m_flags |= XFS_MOUNT_SWALLOC;
|
parsing_mp->m_flags |= XFS_MOUNT_SWALLOC;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_sunit:
|
case Opt_sunit:
|
||||||
mp->m_dalign = result.uint_32;
|
parsing_mp->m_dalign = result.uint_32;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_swidth:
|
case Opt_swidth:
|
||||||
mp->m_swidth = result.uint_32;
|
parsing_mp->m_swidth = result.uint_32;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_inode32:
|
case Opt_inode32:
|
||||||
mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
|
parsing_mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_inode64:
|
case Opt_inode64:
|
||||||
mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
|
parsing_mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_nouuid:
|
case Opt_nouuid:
|
||||||
mp->m_flags |= XFS_MOUNT_NOUUID;
|
parsing_mp->m_flags |= XFS_MOUNT_NOUUID;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_largeio:
|
case Opt_largeio:
|
||||||
mp->m_flags |= XFS_MOUNT_LARGEIO;
|
parsing_mp->m_flags |= XFS_MOUNT_LARGEIO;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_nolargeio:
|
case Opt_nolargeio:
|
||||||
mp->m_flags &= ~XFS_MOUNT_LARGEIO;
|
parsing_mp->m_flags &= ~XFS_MOUNT_LARGEIO;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_filestreams:
|
case Opt_filestreams:
|
||||||
mp->m_flags |= XFS_MOUNT_FILESTREAMS;
|
parsing_mp->m_flags |= XFS_MOUNT_FILESTREAMS;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_noquota:
|
case Opt_noquota:
|
||||||
mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
|
parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
|
||||||
mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
|
parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
|
||||||
mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
|
parsing_mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_quota:
|
case Opt_quota:
|
||||||
case Opt_uquota:
|
case Opt_uquota:
|
||||||
case Opt_usrquota:
|
case Opt_usrquota:
|
||||||
mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
|
parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
|
||||||
XFS_UQUOTA_ENFD);
|
XFS_UQUOTA_ENFD);
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_qnoenforce:
|
case Opt_qnoenforce:
|
||||||
case Opt_uqnoenforce:
|
case Opt_uqnoenforce:
|
||||||
mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
|
parsing_mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE);
|
||||||
mp->m_qflags &= ~XFS_UQUOTA_ENFD;
|
parsing_mp->m_qflags &= ~XFS_UQUOTA_ENFD;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_pquota:
|
case Opt_pquota:
|
||||||
case Opt_prjquota:
|
case Opt_prjquota:
|
||||||
mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
|
parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
|
||||||
XFS_PQUOTA_ENFD);
|
XFS_PQUOTA_ENFD);
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_pqnoenforce:
|
case Opt_pqnoenforce:
|
||||||
mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
|
parsing_mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE);
|
||||||
mp->m_qflags &= ~XFS_PQUOTA_ENFD;
|
parsing_mp->m_qflags &= ~XFS_PQUOTA_ENFD;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_gquota:
|
case Opt_gquota:
|
||||||
case Opt_grpquota:
|
case Opt_grpquota:
|
||||||
mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
|
parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
|
||||||
XFS_GQUOTA_ENFD);
|
XFS_GQUOTA_ENFD);
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_gqnoenforce:
|
case Opt_gqnoenforce:
|
||||||
mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
|
parsing_mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
|
||||||
mp->m_qflags &= ~XFS_GQUOTA_ENFD;
|
parsing_mp->m_qflags &= ~XFS_GQUOTA_ENFD;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_discard:
|
case Opt_discard:
|
||||||
mp->m_flags |= XFS_MOUNT_DISCARD;
|
parsing_mp->m_flags |= XFS_MOUNT_DISCARD;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_nodiscard:
|
case Opt_nodiscard:
|
||||||
mp->m_flags &= ~XFS_MOUNT_DISCARD;
|
parsing_mp->m_flags &= ~XFS_MOUNT_DISCARD;
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef CONFIG_FS_DAX
|
#ifdef CONFIG_FS_DAX
|
||||||
case Opt_dax:
|
case Opt_dax:
|
||||||
xfs_mount_set_dax_mode(mp, XFS_DAX_ALWAYS);
|
xfs_mount_set_dax_mode(parsing_mp, XFS_DAX_ALWAYS);
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_dax_enum:
|
case Opt_dax_enum:
|
||||||
xfs_mount_set_dax_mode(mp, result.uint_32);
|
xfs_mount_set_dax_mode(parsing_mp, result.uint_32);
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
/* Following mount options will be removed in September 2025 */
|
/* Following mount options will be removed in September 2025 */
|
||||||
case Opt_ikeep:
|
case Opt_ikeep:
|
||||||
xfs_warn(mp, "%s mount option is deprecated.", param->key);
|
xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
|
||||||
mp->m_flags |= XFS_MOUNT_IKEEP;
|
parsing_mp->m_flags |= XFS_MOUNT_IKEEP;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_noikeep:
|
case Opt_noikeep:
|
||||||
xfs_warn(mp, "%s mount option is deprecated.", param->key);
|
xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
|
||||||
mp->m_flags &= ~XFS_MOUNT_IKEEP;
|
parsing_mp->m_flags &= ~XFS_MOUNT_IKEEP;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_attr2:
|
case Opt_attr2:
|
||||||
xfs_warn(mp, "%s mount option is deprecated.", param->key);
|
xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
|
||||||
mp->m_flags |= XFS_MOUNT_ATTR2;
|
parsing_mp->m_flags |= XFS_MOUNT_ATTR2;
|
||||||
return 0;
|
return 0;
|
||||||
case Opt_noattr2:
|
case Opt_noattr2:
|
||||||
xfs_warn(mp, "%s mount option is deprecated.", param->key);
|
xfs_warn(parsing_mp, "%s mount option is deprecated.", param->key);
|
||||||
mp->m_flags &= ~XFS_MOUNT_ATTR2;
|
parsing_mp->m_flags &= ~XFS_MOUNT_ATTR2;
|
||||||
mp->m_flags |= XFS_MOUNT_NOATTR2;
|
parsing_mp->m_flags |= XFS_MOUNT_NOATTR2;
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
xfs_warn(mp, "unknown mount option [%s].", param->key);
|
xfs_warn(parsing_mp, "unknown mount option [%s].", param->key);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue