diff options
Diffstat (limited to 'fs/nfs/objlayout/objlayout.h')
-rw-r--r-- | fs/nfs/objlayout/objlayout.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/nfs/objlayout/objlayout.h b/fs/nfs/objlayout/objlayout.h index 9a405e8069f3..b0bb975058e4 100644 --- a/fs/nfs/objlayout/objlayout.h +++ b/fs/nfs/objlayout/objlayout.h | |||
@@ -50,6 +50,10 @@ | |||
50 | */ | 50 | */ |
51 | struct objlayout { | 51 | struct objlayout { |
52 | struct pnfs_layout_hdr pnfs_layout; | 52 | struct pnfs_layout_hdr pnfs_layout; |
53 | |||
54 | /* for layout_return */ | ||
55 | spinlock_t lock; | ||
56 | struct list_head err_list; | ||
53 | }; | 57 | }; |
54 | 58 | ||
55 | static inline struct objlayout * | 59 | static inline struct objlayout * |
@@ -76,6 +80,16 @@ struct objlayout_io_state { | |||
76 | int status; /* res */ | 80 | int status; /* res */ |
77 | int eof; /* res */ | 81 | int eof; /* res */ |
78 | int committed; /* res */ | 82 | int committed; /* res */ |
83 | |||
84 | /* Error reporting (layout_return) */ | ||
85 | struct list_head err_list; | ||
86 | unsigned num_comps; | ||
87 | /* Pointer to array of error descriptors of size num_comps. | ||
88 | * It should contain as many entries as devices in the osd_layout | ||
89 | * that participate in the I/O. It is up to the io_engine to allocate | ||
90 | * needed space and set num_comps. | ||
91 | */ | ||
92 | struct pnfs_osd_ioerr *ioerrs; | ||
79 | }; | 93 | }; |
80 | 94 | ||
81 | /* | 95 | /* |
@@ -101,6 +115,10 @@ extern ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, | |||
101 | /* | 115 | /* |
102 | * callback API | 116 | * callback API |
103 | */ | 117 | */ |
118 | extern void objlayout_io_set_result(struct objlayout_io_state *state, | ||
119 | unsigned index, struct pnfs_osd_objid *pooid, | ||
120 | int osd_error, u64 offset, u64 length, bool is_write); | ||
121 | |||
104 | extern void objlayout_read_done(struct objlayout_io_state *state, | 122 | extern void objlayout_read_done(struct objlayout_io_state *state, |
105 | ssize_t status, bool sync); | 123 | ssize_t status, bool sync); |
106 | extern void objlayout_write_done(struct objlayout_io_state *state, | 124 | extern void objlayout_write_done(struct objlayout_io_state *state, |
@@ -131,4 +149,9 @@ extern enum pnfs_try_status objlayout_write_pagelist( | |||
131 | struct nfs_write_data *, | 149 | struct nfs_write_data *, |
132 | int how); | 150 | int how); |
133 | 151 | ||
152 | extern void objlayout_encode_layoutreturn( | ||
153 | struct pnfs_layout_hdr *, | ||
154 | struct xdr_stream *, | ||
155 | const struct nfs4_layoutreturn_args *); | ||
156 | |||
134 | #endif /* _OBJLAYOUT_H */ | 157 | #endif /* _OBJLAYOUT_H */ |