diff options
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index f91d0d45551c..e2612ea0cbed 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | enum { | 33 | enum { |
34 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ | 34 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ |
35 | NFS_LSEG_ROC, /* roc bit received from server */ | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | struct pnfs_layout_segment { | 38 | struct pnfs_layout_segment { |
@@ -50,6 +51,7 @@ enum { | |||
50 | NFS_LAYOUT_RO_FAILED = 0, /* get ro layout failed stop trying */ | 51 | NFS_LAYOUT_RO_FAILED = 0, /* get ro layout failed stop trying */ |
51 | NFS_LAYOUT_RW_FAILED, /* get rw layout failed stop trying */ | 52 | NFS_LAYOUT_RW_FAILED, /* get rw layout failed stop trying */ |
52 | NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */ | 53 | NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */ |
54 | NFS_LAYOUT_ROC, /* some lseg had roc bit set */ | ||
53 | NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */ | 55 | NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */ |
54 | }; | 56 | }; |
55 | 57 | ||
@@ -72,6 +74,7 @@ struct pnfs_layout_hdr { | |||
72 | struct list_head plh_segs; /* layout segments list */ | 74 | struct list_head plh_segs; /* layout segments list */ |
73 | nfs4_stateid plh_stateid; | 75 | nfs4_stateid plh_stateid; |
74 | atomic_t plh_outstanding; /* number of RPCs out */ | 76 | atomic_t plh_outstanding; /* number of RPCs out */ |
77 | unsigned long plh_block_lgets; /* block LAYOUTGET if >0 */ | ||
75 | u32 plh_barrier; /* ignore lower seqids */ | 78 | u32 plh_barrier; /* ignore lower seqids */ |
76 | unsigned long plh_flags; | 79 | unsigned long plh_flags; |
77 | struct inode *plh_inode; | 80 | struct inode *plh_inode; |
@@ -162,6 +165,10 @@ int pnfs_choose_layoutget_stateid(nfs4_stateid *dst, | |||
162 | int mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo, | 165 | int mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo, |
163 | struct list_head *tmp_list, | 166 | struct list_head *tmp_list, |
164 | u32 iomode); | 167 | u32 iomode); |
168 | bool pnfs_roc(struct inode *ino); | ||
169 | void pnfs_roc_release(struct inode *ino); | ||
170 | void pnfs_roc_set_barrier(struct inode *ino, u32 barrier); | ||
171 | bool pnfs_roc_drain(struct inode *ino, u32 *barrier); | ||
165 | 172 | ||
166 | 173 | ||
167 | static inline int lo_fail_bit(u32 iomode) | 174 | static inline int lo_fail_bit(u32 iomode) |
@@ -193,6 +200,28 @@ pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx, | |||
193 | return NULL; | 200 | return NULL; |
194 | } | 201 | } |
195 | 202 | ||
203 | static inline bool | ||
204 | pnfs_roc(struct inode *ino) | ||
205 | { | ||
206 | return false; | ||
207 | } | ||
208 | |||
209 | static inline void | ||
210 | pnfs_roc_release(struct inode *ino) | ||
211 | { | ||
212 | } | ||
213 | |||
214 | static inline void | ||
215 | pnfs_roc_set_barrier(struct inode *ino, u32 barrier) | ||
216 | { | ||
217 | } | ||
218 | |||
219 | static inline bool | ||
220 | pnfs_roc_drain(struct inode *ino, u32 *barrier) | ||
221 | { | ||
222 | return false; | ||
223 | } | ||
224 | |||
196 | static inline void set_pnfs_layoutdriver(struct nfs_server *s, u32 id) | 225 | static inline void set_pnfs_layoutdriver(struct nfs_server *s, u32 id) |
197 | { | 226 | { |
198 | } | 227 | } |