summaryrefslogtreecommitdiff
path: root/libbcachefs/io.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-02-18 21:43:46 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-02-19 19:01:05 -0500
commit90ef8b9f57c9114e82c41aef43db80776bbfaf82 (patch)
tree229cdb88aff8c0f5e838a2758ba96e7294a74962 /libbcachefs/io.h
parent4aefd5f903fe99bb34cbb2922d488e9a29e78ea9 (diff)
Update bcachefs sources to 90d78c2461 bcachefs: Option parsing for io targets
Diffstat (limited to 'libbcachefs/io.h')
-rw-r--r--libbcachefs/io.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/libbcachefs/io.h b/libbcachefs/io.h
index 4208fd43..bf0b17e1 100644
--- a/libbcachefs/io.h
+++ b/libbcachefs/io.h
@@ -61,24 +61,25 @@ static inline struct workqueue_struct *index_update_wq(struct bch_write_op *op)
int bch2_write_index_default(struct bch_write_op *);
-static inline void bch2_write_op_init(struct bch_write_op *op, struct bch_fs *c)
+static inline void bch2_write_op_init(struct bch_write_op *op, struct bch_fs *c,
+ struct bch_io_opts opts)
{
op->c = c;
op->io_wq = index_update_wq(op);
op->flags = 0;
op->written = 0;
op->error = 0;
- op->csum_type = bch2_data_checksum_type(c, c->opts.data_checksum);
- op->compression_type =
- bch2_compression_opt_to_type[c->opts.compression];
+ op->csum_type = bch2_data_checksum_type(c, opts.data_checksum);
+ op->compression_type = bch2_compression_opt_to_type[opts.compression];
op->nr_replicas = 0;
op->nr_replicas_required = c->opts.data_replicas_required;
op->alloc_reserve = RESERVE_NONE;
op->open_buckets_nr = 0;
op->devs_have.nr = 0;
+ op->target = 0;
+ op->opts = opts;
op->pos = POS_MAX;
op->version = ZERO_VERSION;
- op->devs = NULL;
op->write_point = (struct write_point_specifier) { 0 };
op->res = (struct disk_reservation) { 0 };
op->journal_seq = 0;