diff options
Diffstat (limited to 'fs/nfs/nfs4filelayout.h')
-rw-r--r-- | fs/nfs/nfs4filelayout.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h index 96b89bbddf4f..2f6330c4ee3e 100644 --- a/fs/nfs/nfs4filelayout.h +++ b/fs/nfs/nfs4filelayout.h | |||
@@ -62,12 +62,8 @@ struct nfs4_pnfs_ds { | |||
62 | atomic_t ds_count; | 62 | atomic_t ds_count; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* nfs4_file_layout_dsaddr flags */ | ||
66 | #define NFS4_DEVICE_ID_NEG_ENTRY 0x00000001 | ||
67 | |||
68 | struct nfs4_file_layout_dsaddr { | 65 | struct nfs4_file_layout_dsaddr { |
69 | struct nfs4_deviceid_node id_node; | 66 | struct nfs4_deviceid_node id_node; |
70 | unsigned long flags; | ||
71 | u32 stripe_count; | 67 | u32 stripe_count; |
72 | u8 *stripe_indices; | 68 | u8 *stripe_indices; |
73 | u32 ds_num; | 69 | u32 ds_num; |
@@ -111,6 +107,23 @@ FILELAYOUT_DEVID_NODE(struct pnfs_layout_segment *lseg) | |||
111 | return &FILELAYOUT_LSEG(lseg)->dsaddr->id_node; | 107 | return &FILELAYOUT_LSEG(lseg)->dsaddr->id_node; |
112 | } | 108 | } |
113 | 109 | ||
110 | static inline void | ||
111 | filelayout_mark_devid_invalid(struct nfs4_deviceid_node *node) | ||
112 | { | ||
113 | u32 *p = (u32 *)&node->deviceid; | ||
114 | |||
115 | printk(KERN_WARNING "NFS: Deviceid [%x%x%x%x] marked out of use.\n", | ||
116 | p[0], p[1], p[2], p[3]); | ||
117 | |||
118 | set_bit(NFS_DEVICEID_INVALID, &node->flags); | ||
119 | } | ||
120 | |||
121 | static inline bool | ||
122 | filelayout_test_devid_invalid(struct nfs4_deviceid_node *node) | ||
123 | { | ||
124 | return test_bit(NFS_DEVICEID_INVALID, &node->flags); | ||
125 | } | ||
126 | |||
114 | extern struct nfs_fh * | 127 | extern struct nfs_fh * |
115 | nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j); | 128 | nfs4_fl_select_ds_fh(struct pnfs_layout_segment *lseg, u32 j); |
116 | 129 | ||