aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-18 19:51:12 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-09-28 16:03:09 -0400
commit1dfed2737d8cfe2f2378fddfb3bed126ff5474e7 (patch)
tree865edd1618f525a66a30eac1e017a896b4f2bb8c /fs/nfs/pnfs.h
parent25c7533357a4c4a9311d40cc92e9648c8a7e763e (diff)
NFSv4.1: pNFS data servers may be temporarily offline
In cases where the pNFS data server is just temporarily out of service, we want to mark it as such, and then try again later. Typically that will be in cases of network connection errors etc. This patch allows us to mark the devices as being "unavailable" for such transient errors, and will make them available for retries after a 2 minute timeout period. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index bc8e5001203d..9735031e1e1a 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -234,6 +234,7 @@ struct nfs4_threshold *pnfs_mdsthreshold_alloc(void);
234/* nfs4_deviceid_flags */ 234/* nfs4_deviceid_flags */
235enum { 235enum {
236 NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */ 236 NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */
237 NFS_DEVICEID_UNAVAILABLE, /* device temporarily unavailable */
237}; 238};
238 239
239/* pnfs_dev.c */ 240/* pnfs_dev.c */
@@ -243,6 +244,7 @@ struct nfs4_deviceid_node {
243 const struct pnfs_layoutdriver_type *ld; 244 const struct pnfs_layoutdriver_type *ld;
244 const struct nfs_client *nfs_client; 245 const struct nfs_client *nfs_client;
245 unsigned long flags; 246 unsigned long flags;
247 unsigned long timestamp_unavailable;
246 struct nfs4_deviceid deviceid; 248 struct nfs4_deviceid deviceid;
247 atomic_t ref; 249 atomic_t ref;
248}; 250};
@@ -255,6 +257,8 @@ void nfs4_init_deviceid_node(struct nfs4_deviceid_node *,
255 const struct nfs4_deviceid *); 257 const struct nfs4_deviceid *);
256struct nfs4_deviceid_node *nfs4_insert_deviceid_node(struct nfs4_deviceid_node *); 258struct nfs4_deviceid_node *nfs4_insert_deviceid_node(struct nfs4_deviceid_node *);
257bool nfs4_put_deviceid_node(struct nfs4_deviceid_node *); 259bool nfs4_put_deviceid_node(struct nfs4_deviceid_node *);
260void nfs4_mark_deviceid_unavailable(struct nfs4_deviceid_node *node);
261bool nfs4_test_deviceid_unavailable(struct nfs4_deviceid_node *node);
258void nfs4_deviceid_purge_client(const struct nfs_client *); 262void nfs4_deviceid_purge_client(const struct nfs_client *);
259 263
260static inline void 264static inline void