unsigned i;
rcu_read_lock();
- list_for_each_entry(c, &bch_cache_sets, list)
+ list_for_each_entry(c, &bch_fs_list, list)
for_each_cache_rcu(ca, c, i)
if (ca->disk_sb.bdev == bdev) {
rcu_read_unlock();
}
static const char *bch_blkdev_open(const char *path, void *holder,
- struct cache_set_opts opts,
+ struct bch_opts opts,
struct block_device **ret)
{
struct block_device *bdev;
}
/* Update cached mi: */
-int bch_cache_set_mi_update(struct cache_set *c,
- struct bch_member *mi,
- unsigned nr_devices)
+int bch_fs_mi_update(struct cache_set *c, struct bch_member *mi,
+ unsigned nr_devices)
{
struct cache_member_rcu *new, *old;
struct cache *ca;
if (bch_fs_sb_realloc(c, le32_to_cpu(src->u64s) - journal_u64s))
return -ENOMEM;
- if (bch_cache_set_mi_update(c, members->members, src->nr_devices))
+ if (bch_fs_mi_update(c, members->members, src->nr_devices))
return -ENOMEM;
__copy_super(c->disk_sb, src);
}
const char *bch_read_super(struct bcache_superblock *sb,
- struct cache_set_opts opts,
+ struct bch_opts opts,
const char *path)
{
struct bch_sb_layout layout;
goto err;
err = "dynamic fault";
- if (cache_set_init_fault("read_super"))
+ if (bch_fs_init_fault("read_super"))
goto err;
err = read_one_super(sb, BCH_SB_SECTOR);
/* XXX: return errors directly */
- cache_fatal_io_err_on(bio->bi_error, ca, "superblock write");
+ bch_dev_fatal_io_err_on(bio->bi_error, ca, "superblock write");
bch_account_io_completion(ca);
} while (wrote);
/* Make new options visible after they're persistent: */
- bch_cache_set_mi_update(c, members->members, c->sb.nr_devices);
+ bch_fs_mi_update(c, members->members, c->sb.nr_devices);
bch_sb_update(c);
}