diff options
author | Andy Adamson <andros@netapp.com> | 2010-10-20 00:18:02 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-24 18:07:10 -0400 |
commit | 974cec8ca0352eb5d281535b714cf194a606e98f (patch) | |
tree | 0e71706c3091fc785bab0be8edc5de36816685ff /fs/nfs/pnfs.h | |
parent | e5e940170b2136ad4d5483ef293ae284b9cc8d53 (diff) |
NFS: client needs to maintain list of inodes with active layouts
In particular, server reboot will invalidate all layouts.
Note that in order to have an active layout, we must get a successful response
from the server. To avoid adding that machinery, this patch just includes a
stub that fakes up a successful return. Since the layout is never referenced
for io, this is not a problem.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 4ed1b48c71b1..1c3eb02f4944 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -30,6 +30,13 @@ | |||
30 | #ifndef FS_NFS_PNFS_H | 30 | #ifndef FS_NFS_PNFS_H |
31 | #define FS_NFS_PNFS_H | 31 | #define FS_NFS_PNFS_H |
32 | 32 | ||
33 | struct pnfs_layout_segment { | ||
34 | struct list_head fi_list; | ||
35 | u32 iomode; | ||
36 | struct kref kref; | ||
37 | struct pnfs_layout_hdr *layout; | ||
38 | }; | ||
39 | |||
33 | #ifdef CONFIG_NFS_V4_1 | 40 | #ifdef CONFIG_NFS_V4_1 |
34 | 41 | ||
35 | #define LAYOUT_NFSV4_1_MODULE_PREFIX "nfs-layouttype4" | 42 | #define LAYOUT_NFSV4_1_MODULE_PREFIX "nfs-layouttype4" |
@@ -51,6 +58,8 @@ struct pnfs_layoutdriver_type { | |||
51 | 58 | ||
52 | struct pnfs_layout_hdr { | 59 | struct pnfs_layout_hdr { |
53 | unsigned long refcount; | 60 | unsigned long refcount; |
61 | struct list_head layouts; /* other client layouts */ | ||
62 | struct list_head segs; /* layout segments list */ | ||
54 | unsigned long state; | 63 | unsigned long state; |
55 | struct inode *inode; | 64 | struct inode *inode; |
56 | }; | 65 | }; |
@@ -64,6 +73,7 @@ pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx, | |||
64 | void set_pnfs_layoutdriver(struct nfs_server *, u32 id); | 73 | void set_pnfs_layoutdriver(struct nfs_server *, u32 id); |
65 | void unset_pnfs_layoutdriver(struct nfs_server *); | 74 | void unset_pnfs_layoutdriver(struct nfs_server *); |
66 | void pnfs_destroy_layout(struct nfs_inode *); | 75 | void pnfs_destroy_layout(struct nfs_inode *); |
76 | void pnfs_destroy_all_layouts(struct nfs_client *); | ||
67 | 77 | ||
68 | 78 | ||
69 | static inline int lo_fail_bit(u32 iomode) | 79 | static inline int lo_fail_bit(u32 iomode) |
@@ -80,6 +90,10 @@ static inline int pnfs_enabled_sb(struct nfs_server *nfss) | |||
80 | 90 | ||
81 | #else /* CONFIG_NFS_V4_1 */ | 91 | #else /* CONFIG_NFS_V4_1 */ |
82 | 92 | ||
93 | static inline void pnfs_destroy_all_layouts(struct nfs_client *clp) | ||
94 | { | ||
95 | } | ||
96 | |||
83 | static inline void pnfs_destroy_layout(struct nfs_inode *nfsi) | 97 | static inline void pnfs_destroy_layout(struct nfs_inode *nfsi) |
84 | { | 98 | { |
85 | } | 99 | } |