Skip to contentSkip to conversation

cifs: warn about deprecation of /proc/fs/cifs/OplockEnabled interface

PATCH Superseded Suresh Jayaraman 2 participants 4 messages Oct 12, 2011 – Oct 13, 2011 3 messages not in the archive

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 cifs: warn about deprecation of /proc/fs/cifs/OplockEnabled interface

The plan is to deprecate this interface by kernel version 3.4.

Changes since v1
- add a '\n' to the printk.

---
 fs/cifs/cifs_debug.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/cifs/cifs_debug.c +3 -0
index 2fe3cf1..831fe13 100644
@@ -526,6 +526,9 @@ static ssize_t cifs_oplock_proc_write(struct file *file,
 	char c;
 	int rc;
 
+	printk(KERN_WARNING "CIFS: The /proc/fs/cifs/OplockEnabled interface "
+	       "will be removed in kernel version 3.4. Please migrate to "
+	       "using the 'enable_oplocks' module parameter in cifs.ko.\n");
 	rc = get_user(c, buffer);
 	if (rc)
 		return rc;
#2 lore raw
In reply to a message not in the archive

Shouldn't we note /sys/module/cifs/parameters/echo_retries in the message and the readme (since changing at runtime, e.g. to work around a server bug temporarily, is probably more common that at module install time). I will probably make a minor update to the readme to note this if it is not in the patch, but not sure about the printk.

Quoted 27 lines · Suresh Jayaraman

The plan is to deprecate this interface by kernel version 3.4.

Changes since v1
  - add a '\n' to the printk.

---
 fs/cifs/cifs_debug.c |    3 +++

 1 files changed, 3 insertions(+), 0 deletions(-)
fs/cifs/cifs_debug.c +3 -0
index 2fe3cf1..831fe13 100644
@@ -526,6 +526,9 @@ static ssize_t cifs_oplock_proc_write(struct file *file,
        char c;
        int rc;
 
+       printk(KERN_WARNING "CIFS: The /proc/fs/cifs/OplockEnabled interface "
+              "will be removed in kernel version 3.4. Please migrate to "
+              "using the 'enable_oplocks' module parameter in cifs.ko.\n");
        rc = get_user(c, buffer);
        if (rc)
                return rc;
Signature · 3 lines
Thanks,

Steve
#4 lore raw
In reply to a message not in the archive

Minor clarification - the readme mentions

/proc/module/cifs/parameters/<param>

i.e. echo "value" > /proc/module/cifs/parameters/<param>

but in my system they are under /sys/module/.... not /proc/module/....

Quoted 42 lines · Steve French

Shouldn't we note /sys/module/cifs/parameters/echo_retries in the message and the readme (since changing at runtime, e.g. to work around a server bug temporarily, is probably more common that at module install time).  I will probably make a minor update to the readme to note this if it is not in the patch, but not sure about the printk.

Quoted 18 lines · Suresh Jayaraman

The plan is to deprecate this interface by kernel version 3.4.

Changes since v1
  - add a '\n' to the printk.

---
 fs/cifs/cifs_debug.c |    3 +++

 1 files changed, 3 insertions(+), 0 deletions(-)
fs/cifs/cifs_debug.c +0 -0
index 2fe3cf1..831fe13 100644

fs/cifs/cifs_debug.c static ssize_t cifs_oplock_proc_write(struct file *file, · line 534

Quoted 9 lines
fs/cifs/cifs_debug.c +3 -0
@@ -526,6 +526,9 @@ static ssize_t cifs_oplock_proc_write(struct file *file,
        char c;
        int rc;
 
+       printk(KERN_WARNING "CIFS: The /proc/fs/cifs/OplockEnabled interface "
+              "will be removed in kernel version 3.4. Please migrate to "
+              "using the 'enable_oplocks' module parameter in cifs.ko.\n");
        rc = get_user(c, buffer);
        if (rc)
                return rc;

--
Thanks,

Steve

Signature · 3 lines
Thanks,

Steve
#6 lore raw
In reply to a message not in the archive
Quoted 7 lines · Steve French

Minor clarification - the readme mentions

/proc/module/cifs/parameters/<param>

i.e. echo "value" > /proc/module/cifs/parameters/<param>

but in my system they are under /sys/module/.... not /proc/module/....

Sorry about this.. It is meant to be /sys/module/.. only. It was a typo. Thanks for fixing it.

-Suresh