diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-07-17 20:42:18 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-08-03 17:05:25 -0400 |
commit | e6cf82d1830f5e16a10d566f58db70f297ba5da8 (patch) | |
tree | 6f6a35753bd58e1d273d68934bacead69a9dbab8 /fs/nfs/pnfs.h | |
parent | 02d1426c7053da7c5a828ae9cd7b636ea4e46bf7 (diff) |
pnfs: add pnfs_put_lseg_async
This is useful when lsegs need to be released while holding locks.
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 203b6c9498b0..aca3dff5dae6 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/nfs_fs.h> | 33 | #include <linux/nfs_fs.h> |
34 | #include <linux/nfs_page.h> | 34 | #include <linux/nfs_page.h> |
35 | #include <linux/workqueue.h> | ||
35 | 36 | ||
36 | enum { | 37 | enum { |
37 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ | 38 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ |
@@ -46,6 +47,7 @@ struct pnfs_layout_segment { | |||
46 | atomic_t pls_refcount; | 47 | atomic_t pls_refcount; |
47 | unsigned long pls_flags; | 48 | unsigned long pls_flags; |
48 | struct pnfs_layout_hdr *pls_layout; | 49 | struct pnfs_layout_hdr *pls_layout; |
50 | struct work_struct pls_work; | ||
49 | }; | 51 | }; |
50 | 52 | ||
51 | enum pnfs_try_status { | 53 | enum pnfs_try_status { |
@@ -181,6 +183,7 @@ extern int nfs4_proc_layoutreturn(struct nfs4_layoutreturn *lrp); | |||
181 | /* pnfs.c */ | 183 | /* pnfs.c */ |
182 | void pnfs_get_layout_hdr(struct pnfs_layout_hdr *lo); | 184 | void pnfs_get_layout_hdr(struct pnfs_layout_hdr *lo); |
183 | void pnfs_put_lseg(struct pnfs_layout_segment *lseg); | 185 | void pnfs_put_lseg(struct pnfs_layout_segment *lseg); |
186 | void pnfs_put_lseg_async(struct pnfs_layout_segment *lseg); | ||
184 | 187 | ||
185 | void set_pnfs_layoutdriver(struct nfs_server *, const struct nfs_fh *, u32); | 188 | void set_pnfs_layoutdriver(struct nfs_server *, const struct nfs_fh *, u32); |
186 | void unset_pnfs_layoutdriver(struct nfs_server *); | 189 | void unset_pnfs_layoutdriver(struct nfs_server *); |
@@ -419,6 +422,10 @@ static inline void pnfs_put_lseg(struct pnfs_layout_segment *lseg) | |||
419 | { | 422 | { |
420 | } | 423 | } |
421 | 424 | ||
425 | static inline void pnfs_put_lseg_async(struct pnfs_layout_segment *lseg) | ||
426 | { | ||
427 | } | ||
428 | |||
422 | static inline int pnfs_return_layout(struct inode *ino) | 429 | static inline int pnfs_return_layout(struct inode *ino) |
423 | { | 430 | { |
424 | return 0; | 431 | return 0; |