[PATCH 2/2] XFS: Mark no-more-exist xfsbufd related sysctl parameters as obsolete.
Satoru Takeuchi
takeuchi_satoru at jp.fujitsu.com
Sun Dec 9 17:42:15 CST 2012
From: Satoru Takeuchi <takeuchi_satoru at jp.fujitsu.com>
xfsbufd is removed since commit 43ff2122e6492bcc88b065c433453dce88223b30.
But there stille be two sysctl parameters about it
(fs.xfs.{xfsbufd_centisecs,age_buffer_centisecs}.)
This patch marks these parameters as obsolete. In adition, prints
a warning message if someone tries to use these parameters.
Signed-off-by: Satoru Takeuchi <takeuchi_satoru at jp.fujitsu.com>
---
Documentation/filesystems/xfs.txt | 8 ++++----
fs/xfs/xfs_globals.c | 2 --
fs/xfs/xfs_linux.h | 2 --
fs/xfs/xfs_sysctl.c | 36 ++++++++++++++++++++++++------------
fs/xfs/xfs_sysctl.h | 2 --
5 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 3fc0c31..31d6ec6 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -183,11 +183,11 @@ The following sysctls are available for the XFS filesystem:
out to disk. This thread will flush log activity out, and
do some processing on unlinked inodes.
- fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000)
- The interval at which xfsbufd scans the dirty metadata buffers list.
+ fs.xfs.xfsbufd_centisecs
+ Obsolete. Don't use it.
- fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000)
- The age at which xfsbufd flushes dirty metadata buffers to disk.
+ fs.xfs.age_buffer_centisecs
+ Obsolete. Don't use it.
fs.xfs.error_level (Min: 0 Default: 3 Max: 11)
A volume knob for error reporting when internal errors occur.
diff --git a/fs/xfs/xfs_globals.c b/fs/xfs/xfs_globals.c
index 76e81cf..ea77e2a 100644
--- a/fs/xfs/xfs_globals.c
+++ b/fs/xfs/xfs_globals.c
@@ -34,8 +34,6 @@ xfs_param_t xfs_params = {
.inherit_sync = { 0, 1, 1 },
.inherit_nodump = { 0, 1, 1 },
.inherit_noatim = { 0, 1, 1 },
- .xfs_buf_timer = { 100/2, 1*100, 30*100 },
- .xfs_buf_age = { 1*100, 15*100, 7200*100},
.inherit_nosym = { 0, 0, 1 },
.rotorstep = { 1, 1, 255 },
.inherit_nodfrg = { 0, 1, 1 },
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index 828662f..f9420f4 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -112,8 +112,6 @@
#define xfs_inherit_sync xfs_params.inherit_sync.val
#define xfs_inherit_nodump xfs_params.inherit_nodump.val
#define xfs_inherit_noatime xfs_params.inherit_noatim.val
-#define xfs_buf_timer_centisecs xfs_params.xfs_buf_timer.val
-#define xfs_buf_age_centisecs xfs_params.xfs_buf_age.val
#define xfs_inherit_nosymlinks xfs_params.inherit_nosym.val
#define xfs_rotorstep xfs_params.rotorstep.val
#define xfs_inherit_nodefrag xfs_params.inherit_nodfrg.val
diff --git a/fs/xfs/xfs_sysctl.c b/fs/xfs/xfs_sysctl.c
index ee2d2ad..a4b7cb2 100644
--- a/fs/xfs/xfs_sysctl.c
+++ b/fs/xfs/xfs_sysctl.c
@@ -74,6 +74,26 @@ xfs_panic_mask_proc_handler(
}
#endif /* CONFIG_PROC_FS */
+static int xfs_proc_obsolete(struct ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+ char kbuf[] = "0\n";
+
+ if (*ppos) {
+ *lenp = 0;
+ return 0;
+ }
+
+ if (copy_to_user(buffer, kbuf, sizeof(kbuf)))
+ return -EFAULT;
+ pr_warn("XFS: %s sysctl parameter is obsolete.\n",
+ table->procname);
+
+ *lenp = 2;
+ *ppos += *lenp;
+ return 2;
+}
+
static ctl_table xfs_table[] = {
{
.procname = "irix_sgid_inherit",
@@ -150,21 +170,13 @@ static ctl_table xfs_table[] = {
},
{
.procname = "xfsbufd_centisecs",
- .data = &xfs_params.xfs_buf_timer.val,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_minmax,
- .extra1 = &xfs_params.xfs_buf_timer.min,
- .extra2 = &xfs_params.xfs_buf_timer.max
+ .mode = 0444,
+ .proc_handler = xfs_proc_obsolete,
},
{
.procname = "age_buffer_centisecs",
- .data = &xfs_params.xfs_buf_age.val,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_minmax,
- .extra1 = &xfs_params.xfs_buf_age.min,
- .extra2 = &xfs_params.xfs_buf_age.max
+ .mode = 0444,
+ .proc_handler = xfs_proc_obsolete,
},
{
.procname = "inherit_nosymlinks",
diff --git a/fs/xfs/xfs_sysctl.h b/fs/xfs/xfs_sysctl.h
index af152eb..23b430e 100644
--- a/fs/xfs/xfs_sysctl.h
+++ b/fs/xfs/xfs_sysctl.h
@@ -41,8 +41,6 @@ typedef struct xfs_param {
xfs_sysctl_val_t inherit_sync; /* Inherit the "sync" inode flag. */
xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
- xfs_sysctl_val_t xfs_buf_timer; /* Interval between xfsbufd wakeups. */
- xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */
xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */
xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */
xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */
-- 1.7.10.4
More information about the xfs
mailing list