Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158984 Details for
Bug 207670
wrong access rights on NFS mount
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed Upstream patch.
linux-2.6.22-nfs-nosharecache-mounts.patch (text/plain), 6.57 KB, created by
Steve Dickson
on 2007-07-11 18:12:08 UTC
(
hide
)
Description:
Proposed Upstream patch.
Filename:
MIME Type:
Creator:
Steve Dickson
Created:
2007-07-11 18:12:08 UTC
Size:
6.57 KB
patch
obsolete
>commit 0e1675c09fe57d41c4b8e60182cb924e8736ff41 >Author: Trond Myklebust <Trond.Myklebust@netapp.com> >Date: Wed May 16 16:53:28 2007 -0400 > > NFS: Add the mount option "nosharecache" > > Prior to David Howell's mount changes in 2.6.18, users who mounted > different directories which happened to be from the same filesystem on the > server would get different super blocks, and hence could choose different > mount options. As long as there were no hard linked files that crossed from > one subtree to another, this was quite safe. > Post the changes, if the two directories are on the same filesystem (have > the same 'fsid'), they will share the same super block, and hence the same > mount options. > > Add a flag to allow users to elect not to share the NFS super block with > another mount point, even if the fsids are the same. This will allow > users to set different mount options for the two different super blocks, as > was previously possible. It is still up to the user to ensure that there > are no cache coherency issues when doing this, however the default > behaviour will be to share super blocks whenever two paths result in > the same fsid. > > Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> > >diff --git a/fs/nfs/super.c b/fs/nfs/super.c >index ca20d3c..c03120a 100644 >--- a/fs/nfs/super.c >+++ b/fs/nfs/super.c >@@ -291,6 +291,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, > { NFS_MOUNT_NONLM, ",nolock", "" }, > { NFS_MOUNT_NOACL, ",noacl", "" }, > { NFS_MOUNT_NORDIRPLUS, ",nordirplus", "" }, >+ { NFS_MOUNT_UNSHARED, ",nosharecache", ""}, > { 0, NULL, NULL } > }; > const struct proc_nfs_info *nfs_infop; >@@ -602,6 +603,9 @@ static int nfs_compare_super(struct super_block *sb, void *data) > > if (old->nfs_client != server->nfs_client) > return 0; >+ /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */ >+ if (old->flags & NFS_MOUNT_UNSHARED) >+ return 0; > if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0) > return 0; > return 1; >@@ -615,6 +619,7 @@ static int nfs_get_sb(struct file_system_type *fs_type, > struct nfs_fh mntfh; > struct nfs_mount_data *data = raw_data; > struct dentry *mntroot; >+ int (*compare_super)(struct super_block *,void *) = nfs_compare_super; > int error; > > /* Validate the mount data */ >@@ -629,8 +634,11 @@ static int nfs_get_sb(struct file_system_type *fs_type, > goto out_err_noserver; > } > >+ if (server->flags & NFS_MOUNT_UNSHARED) >+ compare_super = NULL; >+ > /* Get a superblock - note that we may end up sharing one that already exists */ >- s = sget(fs_type, nfs_compare_super, nfs_set_super, server); >+ s = sget(fs_type, compare_super, nfs_set_super, server); > if (IS_ERR(s)) { > error = PTR_ERR(s); > goto out_err_nosb; >@@ -691,6 +699,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, > struct super_block *s; > struct nfs_server *server; > struct dentry *mntroot; >+ int (*compare_super)(struct super_block *,void *) = nfs_compare_super; > int error; > > dprintk("--> nfs_xdev_get_sb()\n"); >@@ -702,8 +711,11 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, > goto out_err_noserver; > } > >+ if (server->flags & NFS_MOUNT_UNSHARED) >+ compare_super = NULL; >+ > /* Get a superblock - note that we may end up sharing one that already exists */ >- s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); >+ s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); > if (IS_ERR(s)) { > error = PTR_ERR(s); > goto out_err_nosb; >@@ -808,6 +820,7 @@ static int nfs4_get_sb(struct file_system_type *fs_type, > struct dentry *mntroot; > char *mntpath = NULL, *hostname = NULL, ip_addr[16]; > void *p; >+ int (*compare_super)(struct super_block *,void *) = nfs_compare_super; > int error; > > if (data == NULL) { >@@ -879,8 +892,11 @@ static int nfs4_get_sb(struct file_system_type *fs_type, > goto out_err_noserver; > } > >+ if (server->flags & NFS4_MOUNT_UNSHARED) >+ compare_super = NULL; >+ > /* Get a superblock - note that we may end up sharing one that already exists */ >- s = sget(fs_type, nfs_compare_super, nfs_set_super, server); >+ s = sget(fs_type, compare_super, nfs_set_super, server); > if (IS_ERR(s)) { > error = PTR_ERR(s); > goto out_free; >@@ -949,6 +965,7 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags, > struct super_block *s; > struct nfs_server *server; > struct dentry *mntroot; >+ int (*compare_super)(struct super_block *,void *) = nfs_compare_super; > int error; > > dprintk("--> nfs4_xdev_get_sb()\n"); >@@ -960,8 +977,11 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags, > goto out_err_noserver; > } > >+ if (server->flags & NFS4_MOUNT_UNSHARED) >+ compare_super = NULL; >+ > /* Get a superblock - note that we may end up sharing one that already exists */ >- s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); >+ s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); > if (IS_ERR(s)) { > error = PTR_ERR(s); > goto out_err_nosb; >@@ -1016,6 +1036,7 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags, > struct nfs_server *server; > struct dentry *mntroot; > struct nfs_fh mntfh; >+ int (*compare_super)(struct super_block *,void *) = nfs_compare_super; > int error; > > dprintk("--> nfs4_referral_get_sb()\n"); >@@ -1027,8 +1048,11 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags, > goto out_err_noserver; > } > >+ if (server->flags & NFS4_MOUNT_UNSHARED) >+ compare_super = NULL; >+ > /* Get a superblock - note that we may end up sharing one that already exists */ >- s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); >+ s = sget(&nfs_fs_type, compare_super, nfs_set_super, server); > if (IS_ERR(s)) { > error = PTR_ERR(s); > goto out_err_nosb; >diff --git a/include/linux/nfs4_mount.h b/include/linux/nfs4_mount.h >index 26b4c83..ad1bd4a 100644 >--- a/include/linux/nfs4_mount.h >+++ b/include/linux/nfs4_mount.h >@@ -65,6 +65,7 @@ struct nfs4_mount_data { > #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ > #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ > #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ >+#define NFS4_MOUNT_UNSHARED 0x8000 /* 1 */ > #define NFS4_MOUNT_FLAGMASK 0xFFFF > > #endif >diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h >index cc8b9c5..3e3b521 100644 >--- a/include/linux/nfs_mount.h >+++ b/include/linux/nfs_mount.h >@@ -62,6 +62,7 @@ struct nfs_mount_data { > #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ > #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ > #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ >+#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ > #define NFS_MOUNT_FLAGMASK 0xFFFF > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207670
: 158984 |
158985