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 271811 Details for
Bug 402581
Deadlock while performing nfs operations.
[?]
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 -- add new workqueue for handling nfs4 scheduled work
0001-BZ-402581-nfsv4-create-workqueue-for-handling-nfs4.patch (text/plain), 2.72 KB, created by
Jeff Layton
on 2007-11-28 21:19:24 UTC
(
hide
)
Description:
patch -- add new workqueue for handling nfs4 scheduled work
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-11-28 21:19:24 UTC
Size:
2.72 KB
patch
obsolete
>From fab80dd1b5522e83569e7738cd5d459477328e98 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Wed, 28 Nov 2007 15:52:06 -0500 >Subject: [PATCH] BZ#402581: nfsv4: create workqueue for handling nfs4_close_state_work > >Create a new workqueue to handle nfs4_close_state_work requests. The >current scheme of queueing these to keventd is subject to deadlock >since rpciod can call flush_scheduled_work(). >--- > fs/nfs/nfs4state.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- > 1 files changed, 42 insertions(+), 2 deletions(-) > >diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c >index f1a67e0..a29f8e1 100644 >--- a/fs/nfs/nfs4state.c >+++ b/fs/nfs/nfs4state.c >@@ -52,6 +52,9 @@ > #define OPENOWNER_POOL_SIZE 8 > > static spinlock_t state_spinlock = SPIN_LOCK_UNLOCKED; >+static int nfs4_state_workqueue_users; >+struct workqueue_struct *nfs4_state_workqueue = NULL; >+static DECLARE_MUTEX(nfs4_state_workqueue_sem); > > nfs4_stateid zero_stateid; > >@@ -85,6 +88,37 @@ destroy_nfsv4_state(struct nfs_server *server) > } > } > >+static int >+nfs4_state_workqueue_up(void) >+{ >+ int ret = 0; >+ >+ down(&nfs4_state_workqueue_sem); >+ if (nfs4_state_workqueue == NULL) >+ nfs4_state_workqueue = create_singlethread_workqueue("nfsv4-work"); >+ if (nfs4_state_workqueue) { >+ ++nfs4_state_workqueue_users; >+ ret = 1; >+ } >+ up(&nfs4_state_workqueue_sem); >+ return ret; >+} >+ >+static void >+nfs4_state_workqueue_down(void) >+{ >+ down(&nfs4_state_workqueue_sem); >+ if (--nfs4_state_workqueue_users != 0) >+ goto out; >+ if (nfs4_state_workqueue != NULL) { >+ flush_workqueue(nfs4_state_workqueue); >+ destroy_workqueue(nfs4_state_workqueue); >+ nfs4_state_workqueue = NULL; >+ } >+out: >+ up(&nfs4_state_workqueue_sem); >+} >+ > /* > * nfs4_get_client(): returns an empty client structure > * nfs4_put_client(): drops reference to client structure >@@ -97,10 +131,15 @@ nfs4_alloc_client(struct in_addr *addr) > { > struct nfs4_client *clp; > >- if (nfs_callback_up() < 0) >+ if (!nfs4_state_workqueue_up()) >+ return NULL; >+ if (nfs_callback_up() < 0) { >+ nfs4_state_workqueue_down(); > return NULL; >+ } > if ((clp = kmalloc(sizeof(*clp), GFP_KERNEL)) == NULL) { > nfs_callback_down(); >+ nfs4_state_workqueue_down(); > return NULL; > } > memset(clp, 0, sizeof(*clp)); >@@ -140,6 +179,7 @@ nfs4_free_client(struct nfs4_client *clp) > rpc_shutdown_client(clp->cl_rpcclient); > kfree(clp); > nfs_callback_down(); >+ nfs4_state_workqueue_down(); > } > > static struct nfs4_client *__nfs4_find_client(struct in_addr *addr) >@@ -564,7 +604,7 @@ void nfs4_close_state(struct nfs4_state *state, mode_t mode) > > atomic_inc(&state->owner->so_count); > down_read(&state->owner->so_client->cl_sem); >- schedule_work(work); >+ queue_work(nfs4_state_workqueue, work); > return; > > synchronous: >-- >1.5.3.3 >
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 402581
: 271811