diff options
author | Andy Adamson <andros@netapp.com> | 2011-02-28 20:34:22 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:38:43 -0500 |
commit | 568e8c494ded95a28c5dd8b79b4d3ffb95b6d845 (patch) | |
tree | 00e71f79575635c0ddfcd1210e263088cc121da2 /fs/nfs/nfs4filelayout.h | |
parent | ea8eecdd11ee6becd09c095c8efa88aa7df95961 (diff) |
NFSv4.1: turn off pNFS on ds connection failure
If a data server is unavailable, go through MDS.
Mark the deviceid containing the data server as a negative cache entry.
Do not try to connect to any data server on a deviceid marked as a negative
cache entry. Mark any layout that tries to use the marked deviceid as failed.
Inodes with a layout marked as fails will not use the layout for I/O, and will
not perform any more layoutgets.
Inodes without a layout will still do layoutget, but the layout will get
marked immediately.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.h')
-rw-r--r-- | fs/nfs/nfs4filelayout.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h index 23f1e1e2a0f5..ee0c907742b5 100644 --- a/fs/nfs/nfs4filelayout.h +++ b/fs/nfs/nfs4filelayout.h | |||
@@ -55,10 +55,14 @@ struct nfs4_pnfs_ds { | |||
55 | atomic_t ds_count; | 55 | atomic_t ds_count; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* nfs4_file_layout_dsaddr flags */ | ||
59 | #define NFS4_DEVICE_ID_NEG_ENTRY 0x00000001 | ||
60 | |||
58 | struct nfs4_file_layout_dsaddr { | 61 | struct nfs4_file_layout_dsaddr { |
59 | struct hlist_node node; | 62 | struct hlist_node node; |
60 | struct nfs4_deviceid deviceid; | 63 | struct nfs4_deviceid deviceid; |
61 | atomic_t ref; | 64 | atomic_t ref; |
65 | unsigned long flags; | ||
62 | u32 stripe_count; | 66 | u32 stripe_count; |
63 | u8 *stripe_indices; | 67 | u8 *stripe_indices; |
64 | u32 ds_num; | 68 | u32 ds_num; |