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 155803 Details for
Bug 209964
NFS Client R/O in anaconda preinstall environment
[?]
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]
Initial kernel patch to add nosharecache option (broken, but a start maybe)
nfs-rhel5-2.6.18-add-mount-option-nosharedcache.patch (text/plain), 6.62 KB, created by
Ian Kent
on 2007-05-31 12:50:30 UTC
(
hide
)
Description:
Initial kernel patch to add nosharecache option (broken, but a start maybe)
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2007-05-31 12:50:30 UTC
Size:
6.62 KB
patch
obsolete
>--- linux-2.6.18.noarch/include/linux/nfs_mount.h.add-mount-option-nosharedcache 2007-05-23 17:48:04.000000000 +0800 >+++ linux-2.6.18.noarch/include/linux/nfs_mount.h 2007-05-23 17:56:14.000000000 +0800 >@@ -61,7 +61,8 @@ struct nfs_mount_data { > #define NFS_MOUNT_NOACL 0x0800 /* 4 */ > #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ > #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ >-#define NFS_MOUNT_FSCACHE 0x4000 >+#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ >+#define NFS_MOUNT_FSCACHE 0x0100 > #define NFS_MOUNT_FLAGMASK 0xFFFF > > #endif >--- linux-2.6.18.noarch/include/linux/nfs4_mount.h.add-mount-option-nosharedcache 2007-05-23 17:48:04.000000000 +0800 >+++ linux-2.6.18.noarch/include/linux/nfs4_mount.h 2007-05-23 17:53:47.000000000 +0800 >@@ -65,7 +65,8 @@ 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_FSCACHE 0x4000 /* 1 */ >+#define NFS4_MOUNT_UNSHARED 0x8000 /* 1 */ >+#define NFS4_MOUNT_FSCACHE 0x0100 /* 1 */ > #define NFS4_MOUNT_FLAGMASK 0xFFFF > > #endif >--- linux-2.6.18.noarch/fs/nfs/super.c.add-mount-option-nosharedcache 2007-05-23 17:48:04.000000000 +0800 >+++ linux-2.6.18.noarch/fs/nfs/super.c 2007-05-28 12:11:28.000000000 +0800 >@@ -290,6 +290,7 @@ static void nfs_show_mount_options(struc > { NFS_MOUNT_NOAC, ",noac", "" }, > { NFS_MOUNT_NONLM, ",nolock", "" }, > { NFS_MOUNT_NOACL, ",noacl", "" }, >+ { NFS_MOUNT_UNSHARED, ",nosharecache", ""}, > { NFS_MOUNT_FSCACHE, ",fsc", "" }, > { 0, NULL, NULL } > }; >@@ -600,11 +601,31 @@ static int nfs_compare_super(struct supe > > 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; > } > >+static int nfs_validate_shared_option(struct nfs_server *server, struct vfsmount *mnt) >+{ >+ struct vfsmount *parent = mnt->mnt_parent; >+ int error = 1; >+ >+ if (!(server->flags & NFS_MOUNT_UNSHARED)) >+ return 0; >+ if (server->flags & NFS_MOUNT_FSCACHE) >+ error = -EINVAL; >+ else if (parent != mnt && parent->mnt_sb->s_magic == NFS_SUPER_MAGIC) { >+ struct nfs_server *pserver = NFS_SB(parent->mnt_sb); >+ if (pserver && pserver->flags & NFS_MOUNT_FSCACHE) >+ error = -EINVAL; >+ } >+ return error; >+} >+ > static int nfs_get_sb(struct file_system_type *fs_type, > int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt) > { >@@ -613,6 +634,7 @@ static int nfs_get_sb(struct file_system > 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 */ >@@ -627,8 +649,16 @@ static int nfs_get_sb(struct file_system > goto out_err_noserver; > } > >+ error = nfs_validate_shared_option(server, mnt); >+ if (error < 0) { >+ dprintk("%s: fscache option requires shared super block\n", __FUNCTION__); >+ goto out_err_nosb; >+ } >+ if (error) >+ 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; >@@ -689,6 +719,7 @@ static int nfs_xdev_get_sb(struct file_s > 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"); >@@ -700,8 +731,16 @@ static int nfs_xdev_get_sb(struct file_s > goto out_err_noserver; > } > >+ error = nfs_validate_shared_option(server, mnt); >+ if (error < 0) { >+ dprintk("%s: fscache option requires shared super block\n", __FUNCTION__); >+ goto out_err_nosb; >+ } >+ if (error) >+ 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; >@@ -806,6 +845,7 @@ static int nfs4_get_sb(struct file_syste > 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) { >@@ -874,8 +914,16 @@ static int nfs4_get_sb(struct file_syste > goto out_err_noserver; > } > >+ error = nfs_validate_shared_option(server, mnt); >+ if (error < 0) { >+ dprintk("%s: fscache option requires shared super block\n", __FUNCTION__); >+ goto out_free; >+ } >+ if (error) >+ 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; >@@ -944,6 +992,7 @@ static int nfs4_xdev_get_sb(struct file_ > 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"); >@@ -955,8 +1004,16 @@ static int nfs4_xdev_get_sb(struct file_ > goto out_err_noserver; > } > >+ error = nfs_validate_shared_option(server, mnt); >+ if (error < 0) { >+ dprintk("%s: fscache option requires shared super block\n", __FUNCTION__); >+ goto out_err_nosb; >+ } >+ if (error) >+ 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; >@@ -1011,6 +1068,7 @@ static int nfs4_referral_get_sb(struct f > 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"); >@@ -1022,8 +1080,16 @@ static int nfs4_referral_get_sb(struct f > goto out_err_noserver; > } > >+ error = nfs_validate_shared_option(server, mnt); >+ if (error < 0) { >+ dprintk("%s: fscache option requires shared super block\n", __FUNCTION__); >+ goto out_err_nosb; >+ } >+ if (error) >+ 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;
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 209964
:
138025
|
155801
|
155802
| 155803 |
155804