···11/* SPDX-License-Identifier: GPL-2.0 */22-#ifndef _BCACHEFS_IO_TYPES_H33-#define _BCACHEFS_IO_TYPES_H22+#ifndef _BCACHEFS_IO_WRITE_TYPES_H33+#define _BCACHEFS_IO_WRITE_TYPES_H4455#include "alloc_types.h"66#include "btree_types.h"···12121313#include <linux/llist.h>1414#include <linux/workqueue.h>1515-1616-struct bch_read_bio {1717- struct bch_fs *c;1818- u64 start_time;1919- u64 submit_time;2020-2121- /*2222- * Reads will often have to be split, and if the extent being read from2323- * was checksummed or compressed we'll also have to allocate bounce2424- * buffers and copy the data back into the original bio.2525- *2626- * If we didn't have to split, we have to save and restore the original2727- * bi_end_io - @split below indicates which:2828- */2929- union {3030- struct bch_read_bio *parent;3131- bio_end_io_t *end_io;3232- };3333-3434- /*3535- * Saved copy of bio->bi_iter, from submission time - allows us to3636- * resubmit on IO error, and also to copy data back to the original bio3737- * when we're bouncing:3838- */3939- struct bvec_iter bvec_iter;4040-4141- unsigned offset_into_extent;4242-4343- u16 flags;4444- union {4545- struct {4646- u16 bounce:1,4747- split:1,4848- kmalloc:1,4949- have_ioref:1,5050- narrow_crcs:1,5151- hole:1,5252- retry:2,5353- context:2;5454- };5555- u16 _state;5656- };5757-5858- struct bch_devs_list devs_have;5959-6060- struct extent_ptr_decoded pick;6161-6262- /*6363- * pos we read from - different from data_pos for indirect extents:6464- */6565- u32 subvol;6666- struct bpos read_pos;6767-6868- /*6969- * start pos of data we read (may not be pos of data we want) - for7070- * promote, narrow extents paths:7171- */7272- enum btree_id data_btree;7373- struct bpos data_pos;7474- struct bversion version;7575-7676- struct promote_op *promote;7777-7878- struct bch_io_opts opts;7979-8080- struct work_struct work;8181-8282- struct bio bio;8383-};84158516struct bch_write_bio {8617 struct_group(wbio,···93162 struct bch_write_bio wbio;94163};951649696-#endif /* _BCACHEFS_IO_TYPES_H */165165+#endif /* _BCACHEFS_IO_WRITE_TYPES_H */