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 152182 Details for
Bug 234587
VFS: Busy inodes at umount on NFSv4 filesystem
[?]
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]
patch -- have open context keep a reference to the vfsmount
04-open-ctx-busy-inodes.patch (text/plain), 3.84 KB, created by
Jeff Layton
on 2007-04-10 21:08:29 UTC
(
hide
)
Description:
patch -- have open context keep a reference to the vfsmount
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-04-10 21:08:29 UTC
Size:
3.84 KB
patch
obsolete
>From: Jeff Layton <jlayton@redhat.com> >Subject: [RHEL4.6 PATCH] NFS: prevent busy inodes when fs is unmounted with pending I/O (bz 234587) > >This patch prevents the other "busy inodes at umount" problem that I've been >able to reproduce. This one is less frequent than the other variety, but I've >seen it at least a few times and can reliably reproduce it with the patch for >the other "variety" in place. There's an upstream patch for this, and it's >probably best to fall back on Trond's description of the problem: > > The nfs_open_context may live longer than the file descriptor that spawned > it, so it needs to carry a reference to the vfsmount. If not, then > generic_shutdown_super() may end up being called before reads and writes > have been flushed out. > >This patch is backported from the upstream patch. With this patch plus the >other "busy inodes" patch, I've not been able to reproduce a "busy inodes" >problem on nfs4 at all. Without these patches (or only one of them) I can >reliably reproduce it. > >diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c >index fcc69c1..ea97aa8 100644 >--- a/fs/nfs/inode.c >+++ b/fs/nfs/inode.c >@@ -990,7 +990,7 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) > return err; > } > >-struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred) >+struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, struct dentry *dentry, struct rpc_cred *cred) > { > struct nfs_open_context *ctx; > >@@ -998,6 +998,7 @@ struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rp > if (ctx != NULL) { > atomic_set(&ctx->count, 1); > ctx->dentry = dget(dentry); >+ ctx->vfsmnt = mntget(mnt); > ctx->cred = get_rpccred(cred); > ctx->state = NULL; > ctx->lockowner = current->files; >@@ -1023,6 +1024,7 @@ void put_nfs_open_context(struct nfs_open_context *ctx) > if (ctx->cred != NULL) > put_rpccred(ctx->cred); > dput(ctx->dentry); >+ mntput(ctx->vfsmnt); > kfree(ctx); > } > } >@@ -1082,7 +1084,7 @@ int nfs_open(struct inode *inode, struct file *filp) > > if ((cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0)) == NULL) > return -ENOMEM; >- ctx = alloc_nfs_open_context(filp->f_dentry, cred); >+ ctx = alloc_nfs_open_context(filp->f_vfsmnt, filp->f_dentry, cred); > put_rpccred(cred); > if (ctx == NULL) > return -ENOMEM; >diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >index cdae152..027df15 100644 >--- a/fs/nfs/nfs4proc.c >+++ b/fs/nfs/nfs4proc.c >@@ -2073,7 +2073,7 @@ nfs4_proc_file_open(struct inode *inode, struct file *filp) > cred = rpcauth_lookupcred(NFS_SERVER(inode)->client->cl_auth, 0); > if (unlikely(cred == NULL)) > return -ENOMEM; >- ctx = alloc_nfs_open_context(dentry, cred); >+ ctx = alloc_nfs_open_context(filp->f_vfsmnt, dentry, cred); > put_rpccred(cred); > if (unlikely(ctx == NULL)) > return -ENOMEM; >diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h >index 1555bcb..7a906ab 100644 >--- a/include/linux/nfs_fs.h >+++ b/include/linux/nfs_fs.h >@@ -91,6 +91,7 @@ struct nfs_access_entry { > struct nfs4_state; > struct nfs_open_context { > atomic_t count; >+ struct vfsmount *vfsmnt; > struct dentry *dentry; > struct rpc_cred *cred; > struct nfs4_state *state; >@@ -340,7 +341,7 @@ extern void nfs_end_attr_update(struct inode *); > extern void nfs_begin_data_update(struct inode *); > extern void nfs_end_data_update(struct inode *); > extern void nfs_end_data_update_defer(struct inode *); >-extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred); >+extern struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, struct dentry *dentry, struct rpc_cred *cred); > extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); > extern void put_nfs_open_context(struct nfs_open_context *ctx); > extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx);
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 234587
:
151296
|
151557
|
151576
|
152181
| 152182