}
struct exofs_io_state;
-typedef void (*exofs_io_done_fn)(struct exofs_io_state *or, void *private);
+typedef void (*exofs_io_done_fn)(struct exofs_io_state *ios, void *private);
struct exofs_io_state {
struct kref kref;
unsigned out_attr_len;
struct osd_attr *out_attr;
+ bool reading;
+
/* Variable array of size numdevs */
unsigned numdevs;
struct exofs_per_dev_state {
int exofs_read_kern(struct osd_dev *od, u8 *cred, struct osd_obj_id *obj,
u64 offset, void *p, unsigned length);
+int exofs_get_rw_state(struct exofs_layout *layout, bool is_reading,
+ u64 offset, u64 length, struct exofs_io_state **ios);
int exofs_get_io_state(struct exofs_layout *layout,
struct exofs_io_state **ios);
void exofs_put_io_state(struct exofs_io_state *ios);