diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-10-02 11:03:39 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:10 -0400 |
commit | 4cb13156665d73963fc608af0429d29fa77072c5 (patch) | |
tree | 27a8e4bbdab1330b55b380d2cd489504f114adb2 | |
parent | deb3318b0ea4b288431f09f8dbcf5de90a14b27b (diff) | |
download | linux-stable-4cb13156665d73963fc608af0429d29fa77072c5.tar.gz linux-stable-4cb13156665d73963fc608af0429d29fa77072c5.tar.bz2 linux-stable-4cb13156665d73963fc608af0429d29fa77072c5.zip |
bcachefs: extent_ptr_decoded
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_io.c | 2 | ||||
-rw-r--r-- | fs/bcachefs/btree_io.h | 2 | ||||
-rw-r--r-- | fs/bcachefs/debug.c | 2 | ||||
-rw-r--r-- | fs/bcachefs/extents.c | 8 | ||||
-rw-r--r-- | fs/bcachefs/extents.h | 4 | ||||
-rw-r--r-- | fs/bcachefs/extents_types.h | 4 | ||||
-rw-r--r-- | fs/bcachefs/io.c | 8 | ||||
-rw-r--r-- | fs/bcachefs/io.h | 2 | ||||
-rw-r--r-- | fs/bcachefs/io_types.h | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index 1db103815dd3..96bcdf5339e8 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -1407,7 +1407,7 @@ static void btree_node_read_endio(struct bio *bio) void bch2_btree_node_read(struct bch_fs *c, struct btree *b, bool sync) { - struct extent_pick_ptr pick; + struct extent_ptr_decoded pick; struct btree_read_bio *rb; struct bch_dev *ca; struct bio *bio; diff --git a/fs/bcachefs/btree_io.h b/fs/bcachefs/btree_io.h index 7835f8a9e3a0..34d0c0fe8b25 100644 --- a/fs/bcachefs/btree_io.h +++ b/fs/bcachefs/btree_io.h @@ -15,7 +15,7 @@ struct btree_read_bio { struct bch_fs *c; u64 start_time; unsigned have_ioref:1; - struct extent_pick_ptr pick; + struct extent_ptr_decoded pick; struct work_struct work; struct bio bio; }; diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index 7db0e65927c6..550bb10bbb7b 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -36,7 +36,7 @@ void __bch2_btree_verify(struct bch_fs *c, struct btree *b) struct btree *v = c->verify_data; struct btree_node *n_ondisk, *n_sorted, *n_inmemory; struct bset *sorted, *inmemory; - struct extent_pick_ptr pick; + struct extent_ptr_decoded pick; struct bch_dev *ca; struct bio *bio; diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 77bc33d0a344..45d1f9f29d7c 100644 --- a/fs/bcachefs/extents.c +++ b/fs/bcachefs/extents.c @@ -603,7 +603,7 @@ static inline bool dev_latency_better(struct bch_fs *c, static int extent_pick_read_device(struct bch_fs *c, struct bkey_s_c_extent e, struct bch_devs_mask *avoid, - struct extent_pick_ptr *pick) + struct extent_ptr_decoded *pick) { const struct bch_extent_ptr *ptr; struct bch_extent_crc_unpacked crc; @@ -622,7 +622,7 @@ static int extent_pick_read_device(struct bch_fs *c, if (ret && !dev_latency_better(c, ptr, &pick->ptr)) continue; - *pick = (struct extent_pick_ptr) { + *pick = (struct extent_ptr_decoded) { .ptr = *ptr, .crc = crc, }; @@ -753,7 +753,7 @@ int bch2_btree_ptr_to_text(struct bch_fs *c, char *buf, int bch2_btree_pick_ptr(struct bch_fs *c, const struct btree *b, struct bch_devs_mask *avoid, - struct extent_pick_ptr *pick) + struct extent_ptr_decoded *pick) { return extent_pick_read_device(c, bkey_i_to_s_c_extent(&b->key), avoid, pick); @@ -1958,7 +1958,7 @@ void bch2_extent_mark_replicas_cached(struct bch_fs *c, */ int bch2_extent_pick_ptr(struct bch_fs *c, struct bkey_s_c k, struct bch_devs_mask *avoid, - struct extent_pick_ptr *pick) + struct extent_ptr_decoded *pick) { int ret; diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index 66143d8d3895..7a61c20b101b 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -55,11 +55,11 @@ struct btree_nr_keys bch2_extent_sort_fix_overlapping(struct bch_fs *c, int bch2_btree_pick_ptr(struct bch_fs *, const struct btree *, struct bch_devs_mask *avoid, - struct extent_pick_ptr *); + struct extent_ptr_decoded *); int bch2_extent_pick_ptr(struct bch_fs *, struct bkey_s_c, struct bch_devs_mask *, - struct extent_pick_ptr *); + struct extent_ptr_decoded *); void bch2_extent_trim_atomic(struct bkey_i *, struct btree_iter *); diff --git a/fs/bcachefs/extents_types.h b/fs/bcachefs/extents_types.h index 27b2bde85e5c..3540e2558c0f 100644 --- a/fs/bcachefs/extents_types.h +++ b/fs/bcachefs/extents_types.h @@ -19,9 +19,9 @@ struct bch_extent_crc_unpacked { struct bch_csum csum; }; -struct extent_pick_ptr { - struct bch_extent_ptr ptr; +struct extent_ptr_decoded { struct bch_extent_crc_unpacked crc; + struct bch_extent_ptr ptr; }; #endif /* _BCACHEFS_EXTENTS_TYPES_H */ diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index d5c17024c884..d64463751b84 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -1026,7 +1026,7 @@ static void promote_start(struct promote_op *op, struct bch_read_bio *rbio) noinline static struct promote_op *__promote_alloc(struct bch_fs *c, struct bpos pos, - struct extent_pick_ptr *pick, + struct extent_ptr_decoded *pick, struct bch_io_opts opts, unsigned rbio_sectors, struct bch_read_bio **rbio) @@ -1104,7 +1104,7 @@ err: static inline struct promote_op *promote_alloc(struct bch_fs *c, struct bvec_iter iter, struct bkey_s_c k, - struct extent_pick_ptr *pick, + struct extent_ptr_decoded *pick, struct bch_io_opts opts, unsigned flags, struct bch_read_bio **rbio, @@ -1411,7 +1411,7 @@ out: } static bool should_narrow_crcs(struct bkey_s_c k, - struct extent_pick_ptr *pick, + struct extent_ptr_decoded *pick, unsigned flags) { return !(flags & BCH_READ_IN_RETRY) && @@ -1566,7 +1566,7 @@ int __bch2_read_extent(struct bch_fs *c, struct bch_read_bio *orig, struct bvec_iter iter, struct bkey_s_c k, struct bch_devs_mask *avoid, unsigned flags) { - struct extent_pick_ptr pick; + struct extent_ptr_decoded pick; struct bch_read_bio *rbio = NULL; struct bch_dev *ca; struct promote_op *promote = NULL; diff --git a/fs/bcachefs/io.h b/fs/bcachefs/io.h index 1cc040a413ee..c832b7291005 100644 --- a/fs/bcachefs/io.h +++ b/fs/bcachefs/io.h @@ -99,7 +99,7 @@ static inline struct bch_write_bio *wbio_init(struct bio *bio) struct bch_devs_mask; struct cache_promote_op; -struct extent_pick_ptr; +struct extent_ptr_decoded; int __bch2_read_extent(struct bch_fs *, struct bch_read_bio *, struct bvec_iter, struct bkey_s_c, struct bch_devs_mask *, unsigned); diff --git a/fs/bcachefs/io_types.h b/fs/bcachefs/io_types.h index 48273bb68c94..c697191172b0 100644 --- a/fs/bcachefs/io_types.h +++ b/fs/bcachefs/io_types.h @@ -55,7 +55,7 @@ struct bch_read_bio { struct bch_devs_list devs_have; - struct extent_pick_ptr pick; + struct extent_ptr_decoded pick; /* start pos of data we read (may not be pos of data we want) */ struct bpos pos; struct bversion version; |