aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-07-20 16:09:02 -0400
committerTejun Heo <tj@kernel.org>2010-07-22 16:59:15 -0400
commit9b646972467fb5fdc677f9e4251875db20bdbb64 (patch)
tree01d54cf7e0ee110bd8287c3360de0c3997e859ae /fs/cifs/cifsglob.h
parentd098adfb7d281258173a43151483e52e21761021 (diff)
cifs: use workqueue instead of slow-work
Workqueue can now handle high concurrency. Use system_nrt_wq instead of slow-work. * Updated is_valid_oplock_break() to not call cifs_oplock_break_put() as advised by Steve French. It might cause deadlock. Instead, reference is increased after queueing succeeded and cifs_oplock_break() briefly grabs GlobalSMBSeslock before putting the cfile to make sure it doesn't put before the matching get is finished. * Anton Blanchard reported that cifs conversion was using now gone system_single_wq. Use system_nrt_wq which provides non-reentrance guarantee which is enough and much better. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Steve French <sfrench@samba.org> Cc: Anton Blanchard <anton@samba.org>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index a88479ceaad5..f5a1f9bb3a9f 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -19,7 +19,7 @@
19#include <linux/in.h> 19#include <linux/in.h>
20#include <linux/in6.h> 20#include <linux/in6.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/slow-work.h> 22#include <linux/workqueue.h>
23#include "cifs_fs_sb.h" 23#include "cifs_fs_sb.h"
24#include "cifsacl.h" 24#include "cifsacl.h"
25/* 25/*
@@ -363,7 +363,7 @@ struct cifsFileInfo {
363 atomic_t count; /* reference count */ 363 atomic_t count; /* reference count */
364 struct mutex fh_mutex; /* prevents reopen race after dead ses*/ 364 struct mutex fh_mutex; /* prevents reopen race after dead ses*/
365 struct cifs_search_info srch_inf; 365 struct cifs_search_info srch_inf;
366 struct slow_work oplock_break; /* slow_work job for oplock breaks */ 366 struct work_struct oplock_break; /* work for oplock breaks */
367}; 367};
368 368
369/* Take a reference on the file private data */ 369/* Take a reference on the file private data */
@@ -732,4 +732,6 @@ GLOBAL_EXTERN unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */
732GLOBAL_EXTERN unsigned int cifs_min_small; /* min size of small buf pool */ 732GLOBAL_EXTERN unsigned int cifs_min_small; /* min size of small buf pool */
733GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/ 733GLOBAL_EXTERN unsigned int cifs_max_pending; /* MAX requests at once to server*/
734 734
735extern const struct slow_work_ops cifs_oplock_break_ops; 735void cifs_oplock_break(struct work_struct *work);
736void cifs_oplock_break_get(struct cifsFileInfo *cfile);
737void cifs_oplock_break_put(struct cifsFileInfo *cfile);