[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241104014439.3786609-4-zhangshida@kylinos.cn>
Date: Mon, 4 Nov 2024 09:44:37 +0800
From: zhangshida <starzhangzsd@...il.com>
To: djwong@...nel.org,
dchinner@...hat.com,
leo.lilong@...wei.com,
wozizhi@...wei.com,
osandov@...com,
xiang@...nel.org,
zhangjiachen.jaycee@...edance.com
Cc: linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org,
zhangshida@...inos.cn,
starzhangzsd@...il.com
Subject: [PATCH 3/5] xfs: add mount options as a way to change the AF layout
From: Shida Zhang <zhangshida@...inos.cn>
Except for mount options, maybe there are other ways like ioctl()
to pass the layout from user to the filesystem.
Signed-off-by: Shida Zhang <zhangshida@...inos.cn>
---
fs/xfs/xfs_super.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 0975ad55557e..09dc44480d16 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -105,7 +105,7 @@ enum {
Opt_filestreams, Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota,
Opt_prjquota, Opt_uquota, Opt_gquota, Opt_pquota,
Opt_uqnoenforce, Opt_gqnoenforce, Opt_pqnoenforce, Opt_qnoenforce,
- Opt_discard, Opt_nodiscard, Opt_dax, Opt_dax_enum,
+ Opt_discard, Opt_nodiscard, Opt_dax, Opt_dax_enum, Opt_af1, Opt_af2,
};
static const struct fs_parameter_spec xfs_fs_parameters[] = {
@@ -150,6 +150,8 @@ static const struct fs_parameter_spec xfs_fs_parameters[] = {
fsparam_flag("nodiscard", Opt_nodiscard),
fsparam_flag("dax", Opt_dax),
fsparam_enum("dax", Opt_dax_enum, dax_param_enums),
+ fsparam_u32("af1", Opt_af1),
+ fsparam_u32("af2", Opt_af2),
{}
};
@@ -1396,6 +1398,12 @@ xfs_fs_parse_param(
xfs_fs_warn_deprecated(fc, param, XFS_FEAT_NOATTR2, true);
parsing_mp->m_features |= XFS_FEAT_NOATTR2;
return 0;
+ case Opt_af1:
+ parsing_mp->m_af[0] = result.uint_32;
+ return 0;
+ case Opt_af2:
+ parsing_mp->m_af[1] = result.uint_32;
+ return 0;
default:
xfs_warn(parsing_mp, "unknown mount option [%s].", param->key);
return -EINVAL;
--
2.33.0
Powered by blists - more mailing lists