projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9166b41
)
bcachefs: propagate BCH_WRITE_CACHED
author
Kent Overstreet
<kent.overstreet@gmail.com>
Wed, 5 Dec 2018 17:28:35 +0000
(12:28 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:13 +0000
(17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/io.c
b/fs/bcachefs/io.c
index 542d8ee6144c7f0f709f955b4296d4e0683f34a7..74c3a848e1535bbc8449aa40208c95f2871278de 100644
(file)
--- a/
fs/bcachefs/io.c
+++ b/
fs/bcachefs/io.c
@@
-425,6
+425,7
@@
static void init_append_extent(struct bch_write_op *op,
struct bch_extent_crc_unpacked crc)
{
struct bkey_i_extent *e = bkey_extent_init(op->insert_keys.top);
+ struct bch_extent_ptr *ptr;
op->pos.offset += crc.uncompressed_size;
e->k.p = op->pos;
@@
-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);
+ 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);
}