diff options
author | Benny Halevy <bhalevy@panasas.com> | 2011-07-30 20:52:36 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-31 12:18:15 -0400 |
commit | 738fd0f360359aecc7fcd7604bbe9e854d81fb1f (patch) | |
tree | c2d7ba1680ee37383f1fd537cdafba6fef5dfd8e /fs/nfs/pnfs.h | |
parent | 7f11d8d38d64739e190581e015a2a2730ff54e2a (diff) |
pnfs: add set-clear layoutdriver interface
To allow layout driver to issue getdevicelist at mount time, and clean up
at umount time.
[fixup non NFS_V4_1 set_pnfs_layoutdriver definition]
[pnfs: pass mntfh down the init_pnfs path]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 7074394944a9..bddd8b997e18 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -80,6 +80,9 @@ struct pnfs_layoutdriver_type { | |||
80 | struct module *owner; | 80 | struct module *owner; |
81 | unsigned flags; | 81 | unsigned flags; |
82 | 82 | ||
83 | int (*set_layoutdriver) (struct nfs_server *, const struct nfs_fh *); | ||
84 | int (*clear_layoutdriver) (struct nfs_server *); | ||
85 | |||
83 | struct pnfs_layout_hdr * (*alloc_layout_hdr) (struct inode *inode, gfp_t gfp_flags); | 86 | struct pnfs_layout_hdr * (*alloc_layout_hdr) (struct inode *inode, gfp_t gfp_flags); |
84 | void (*free_layout_hdr) (struct pnfs_layout_hdr *); | 87 | void (*free_layout_hdr) (struct pnfs_layout_hdr *); |
85 | 88 | ||
@@ -167,7 +170,7 @@ void put_lseg(struct pnfs_layout_segment *lseg); | |||
167 | bool pnfs_pageio_init_read(struct nfs_pageio_descriptor *, struct inode *); | 170 | bool pnfs_pageio_init_read(struct nfs_pageio_descriptor *, struct inode *); |
168 | bool pnfs_pageio_init_write(struct nfs_pageio_descriptor *, struct inode *, int); | 171 | bool pnfs_pageio_init_write(struct nfs_pageio_descriptor *, struct inode *, int); |
169 | 172 | ||
170 | void set_pnfs_layoutdriver(struct nfs_server *, u32 id); | 173 | void set_pnfs_layoutdriver(struct nfs_server *, const struct nfs_fh *, u32); |
171 | void unset_pnfs_layoutdriver(struct nfs_server *); | 174 | void unset_pnfs_layoutdriver(struct nfs_server *); |
172 | void pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *, struct nfs_page *); | 175 | void pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *, struct nfs_page *); |
173 | int pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc); | 176 | int pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc); |
@@ -374,7 +377,8 @@ pnfs_roc_drain(struct inode *ino, u32 *barrier) | |||
374 | return false; | 377 | return false; |
375 | } | 378 | } |
376 | 379 | ||
377 | static inline void set_pnfs_layoutdriver(struct nfs_server *s, u32 id) | 380 | static inline void set_pnfs_layoutdriver(struct nfs_server *s, |
381 | const struct nfs_fh *mntfh, u32 id); | ||
378 | { | 382 | { |
379 | } | 383 | } |
380 | 384 | ||