NFS: make remounts of NFS filesystems return a proper error (resend)
Subsystems (2)
PATCH 1/1 NFS: make remounts of NFS filesystems return a proper error (resend)
Hi Trond,
I sent this a few weeks ago and never got a response. Any thoughts?
Thanks,
Jeff
-----------[snip]------------
Currently if you try to remount an NFS filesystem (using -o remount), it will return as if the remount had succeeded even though it doesn't actually apply any changes to the mount options.
Since remount functionality isn't actually implemented, just have any remount attempt return -ENOSYS to make it clear that it doesn't work.
--- fs/nfs/super.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
fs/nfs/super.c +13 -0
@@ -207,6 +207,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt);static void nfs_kill_super (struct super_block *);static void nfs_put_super (struct super_block *); +static int nfs_remount (struct super_block *sb,int *flags,char *data);static struct file_system_type nfs_fs_type = { .owner =THIS_MODULE ,
@@ -230,6 +231,7 @@ static const struct super_operations nfs_sops = { .write_inode = nfs_write_inode, .put_super = nfs_put_super, .statfs = nfs_statfs, + .remount_fs = nfs_remount, .clear_inode = nfs_clear_inode, .umount_begin = nfs_umount_begin, .show_options = nfs_show_options,
@@ -274,6 +276,7 @@ static const struct super_operations nfs4_sops = { .destroy_inode = nfs_destroy_inode, .write_inode = nfs_write_inode, .statfs = nfs_statfs, + .remount_fs = nfs_remount, .clear_inode = nfs4_clear_inode, .umount_begin = nfs_umount_begin, .show_options = nfs_show_options,
@@ -1681,6 +1684,16 @@ error_splat_super:return error; } +/* +* Remounts with NFS have a whole host of issues. Just have them fail +* outright for now. +*/ +static int +nfs_remount (struct super_block *sb,int *flags,char *data) +{ +return -ENOSYS ; +} +#ifdef CONFIG_NFS_V4 /*
Signature · 1 line
1.5.3.6
Quoted 5 lines · Jeff Layton
Hi Trond,
I sent this a few weeks ago and never got a response. Any thoughts?Thanks,
Jeff
Won't it break 'mount -oro,remount /mnt'?
Cheers
Trond
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 5 lines · On Thu, 10 Apr 2008 08:16:36 -0400 Trond Myklebust…
Quoted 3 lines · Jeff Layton
Hi Trond,
I sent this a few weeks ago and never got a response. Any thoughts?
Quoted 8 lines
Quoted 2 lines
Thanks,
JeffWon't it break 'mount -oro,remount /mnt'?
Cheers
Trond
Erm...good point. I suppose we'll have to handle that as a special case if we want to do this.
Signature · 1 line
Jeff Layton <[email protected]>