Commit 56338d3d authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: propagate BCH_WRITE_CACHED

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 9166b41d
...@@ -425,6 +425,7 @@ static void init_append_extent(struct bch_write_op *op, ...@@ -425,6 +425,7 @@ static void init_append_extent(struct bch_write_op *op,
struct bch_extent_crc_unpacked crc) struct bch_extent_crc_unpacked crc)
{ {
struct bkey_i_extent *e = bkey_extent_init(op->insert_keys.top); struct bkey_i_extent *e = bkey_extent_init(op->insert_keys.top);
struct bch_extent_ptr *ptr;
op->pos.offset += crc.uncompressed_size; op->pos.offset += crc.uncompressed_size;
e->k.p = op->pos; e->k.p = op->pos;
...@@ -438,6 +439,10 @@ static void init_append_extent(struct bch_write_op *op, ...@@ -438,6 +439,10 @@ static void init_append_extent(struct bch_write_op *op,
bch2_alloc_sectors_append_ptrs(op->c, wp, &e->k_i, crc.compressed_size); bch2_alloc_sectors_append_ptrs(op->c, wp, &e->k_i, crc.compressed_size);
if (op->flags & BCH_WRITE_CACHED)
extent_for_each_ptr(extent_i_to_s(e), ptr)
ptr->cached = true;
bch2_keylist_push(&op->insert_keys); bch2_keylist_push(&op->insert_keys);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment