nfsd: formally deprecate legacy nfsd syscall interface
authorNeilBrown <neilb@suse.de>
Wed, 22 Sep 2010 02:55:07 +0000 (12:55 +1000)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 22 Sep 2010 19:33:13 +0000 (15:33 -0400)
The syscall interface is has been replaced by a more flexible
interface since 2.6.0.  It is time to work towards discarding
the old interface.

So add a entry in feature-removal-schedule.txt and print a warning
when the interface is used.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Documentation/feature-removal-schedule.txt
fs/nfsd/nfsctl.c

index 842aa9de84a603298f74f9f4b8c036e0104001cf..076a2c02adaf61a7fa34a9b0e5f2f6c14b3d2e68 100644 (file)
@@ -564,3 +564,13 @@ Who:       FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
 
 ----------------------------
 
+What:   access to nfsd auth cache through sys_nfsservctl or '.' files
+        in the 'nfsd' filesystem.
+When:   2.6.40
+Why:    This is a legacy interface which have been replaced by a more
+        dynamic cache.  Continuing to maintain this interface is an
+        unnecessary burden.
+Who:    NeilBrown <neilb@suse.de>
+
+----------------------------
+       
index b53b1d042f1ff3190b6696876da88cf355277b5a..7f0fc8861b854e90dd814a4d6f8c4090041eed3f 100644 (file)
@@ -121,6 +121,16 @@ static ssize_t nfsctl_transaction_write(struct file *file, const char __user *bu
 
 static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size_t size, loff_t *pos)
 {
+       static int warned;
+       if (file->f_dentry->d_name.name[0] == '.' && !warned) {
+               char name[sizeof(current->comm)];
+               printk(KERN_INFO
+                      "Warning: \"%s\" uses deprecated NFSD interface: %s."
+                      "  This will be removed in 2.6.40\n",
+                      get_task_comm(name, current),
+                      file->f_dentry->d_name.name);
+               warned = 1;
+       }
        if (! file->private_data) {
                /* An attempt to read a transaction file without writing
                 * causes a 0-byte write so that the file can return