diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 01:38:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 02:36:19 -0400 |
commit | ff86d4722124c300c40b85b6eb8ef2d410ab303c (patch) | |
tree | 05e54b0bf6397ecbb5e7717a7925ac6ed2645a68 /libbcachefs/disk_groups.h | |
parent | 800408be11898f6d53ceecfd894cce8860fda26a (diff) |
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
Diffstat (limited to 'libbcachefs/disk_groups.h')
-rw-r--r-- | libbcachefs/disk_groups.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/libbcachefs/disk_groups.h b/libbcachefs/disk_groups.h index 9da9805a..e92c0dc5 100644 --- a/libbcachefs/disk_groups.h +++ b/libbcachefs/disk_groups.h @@ -53,34 +53,8 @@ static inline struct target target_decode(unsigned target) return (struct target) { .type = TARGET_NULL }; } -static inline bool dev_in_target(struct bch_dev *ca, unsigned target) -{ - struct target t = target_decode(target); - - switch (t.type) { - case TARGET_NULL: - return false; - case TARGET_DEV: - return ca->dev_idx == t.dev; - case TARGET_GROUP: - return ca->mi.group && ca->mi.group - 1 == t.group; - default: - BUG(); - } -} - -static inline bool dev_idx_in_target(struct bch_fs *c, unsigned dev, unsigned target) -{ - bool ret; - - rcu_read_lock(); - ret = dev_in_target(rcu_dereference(c->devs[dev]), target); - rcu_read_unlock(); - - return ret; -} - const struct bch_devs_mask *bch2_target_to_mask(struct bch_fs *, unsigned); +bool bch2_dev_in_target(struct bch_fs *, unsigned, unsigned); int bch2_disk_path_find(struct bch_sb_handle *, const char *); int bch2_disk_path_find_or_create(struct bch_sb_handle *, const char *); |