Commit e47c0171 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Minor replicas.c refactoring

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e19e57f8
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "replicas.h" #include "replicas.h"
#include "super-io.h" #include "super-io.h"
struct bch_replicas_entry_padded { struct bch_replicas_padded {
struct bch_replicas_entry e; struct bch_replicas_entry e;
u8 pad[BCH_SB_MEMBERS_MAX]; u8 pad[BCH_SB_MEMBERS_MAX];
}; };
...@@ -270,7 +270,7 @@ int bch2_mark_replicas(struct bch_fs *c, ...@@ -270,7 +270,7 @@ int bch2_mark_replicas(struct bch_fs *c,
enum bch_data_type data_type, enum bch_data_type data_type,
struct bch_devs_list devs) struct bch_devs_list devs)
{ {
struct bch_replicas_entry_padded search; struct bch_replicas_padded search;
if (!devs.nr) if (!devs.nr)
return 0; return 0;
...@@ -286,7 +286,7 @@ int bch2_mark_replicas(struct bch_fs *c, ...@@ -286,7 +286,7 @@ int bch2_mark_replicas(struct bch_fs *c,
int bch2_mark_bkey_replicas(struct bch_fs *c, struct bkey_s_c k) int bch2_mark_bkey_replicas(struct bch_fs *c, struct bkey_s_c k)
{ {
struct bch_replicas_entry_padded search; struct bch_replicas_padded search;
struct bch_devs_list cached = bch2_bkey_cached_devs(k); struct bch_devs_list cached = bch2_bkey_cached_devs(k);
unsigned i; unsigned i;
int ret; int ret;
...@@ -682,7 +682,7 @@ bool bch2_replicas_marked(struct bch_fs *c, ...@@ -682,7 +682,7 @@ bool bch2_replicas_marked(struct bch_fs *c,
struct bch_devs_list devs, struct bch_devs_list devs,
bool check_gc_replicas) bool check_gc_replicas)
{ {
struct bch_replicas_entry_padded search; struct bch_replicas_padded search;
if (!devs.nr) if (!devs.nr)
return true; return true;
...@@ -698,7 +698,7 @@ bool bch2_bkey_replicas_marked(struct bch_fs *c, ...@@ -698,7 +698,7 @@ bool bch2_bkey_replicas_marked(struct bch_fs *c,
struct bkey_s_c k, struct bkey_s_c k,
bool check_gc_replicas) bool check_gc_replicas)
{ {
struct bch_replicas_entry_padded search; struct bch_replicas_padded search;
struct bch_devs_list cached = bch2_bkey_cached_devs(k); struct bch_devs_list cached = bch2_bkey_cached_devs(k);
unsigned i; unsigned i;
......
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