Commit c7f01477 authored by Jan Kara's avatar Jan Kara Committed by Jens Axboe

exofs: Convert to separately allocated bdi

Allocate struct backing_dev_info separately instead of embedding it
inside the superblock. This unifies handling of bdi among users.

CC: Boaz Harrosh <ooo@electrozaur.com>
CC: Benny Halevy <bhalevy@primarydata.com>
Acked-by: default avatarBoaz Harrosh <ooo@electrozaur.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent a5695a79
...@@ -64,7 +64,6 @@ struct exofs_dev { ...@@ -64,7 +64,6 @@ struct exofs_dev {
* our extension to the in-memory superblock * our extension to the in-memory superblock
*/ */
struct exofs_sb_info { struct exofs_sb_info {
struct backing_dev_info bdi; /* register our bdi with VFS */
struct exofs_sb_stats s_ess; /* Written often, pre-allocate*/ struct exofs_sb_stats s_ess; /* Written often, pre-allocate*/
int s_timeout; /* timeout for OSD operations */ int s_timeout; /* timeout for OSD operations */
uint64_t s_nextid; /* highest object ID used */ uint64_t s_nextid; /* highest object ID used */
......
...@@ -464,7 +464,6 @@ static void exofs_put_super(struct super_block *sb) ...@@ -464,7 +464,6 @@ static void exofs_put_super(struct super_block *sb)
sbi->one_comp.obj.partition); sbi->one_comp.obj.partition);
exofs_sysfs_sb_del(sbi); exofs_sysfs_sb_del(sbi);
bdi_destroy(&sbi->bdi);
exofs_free_sbi(sbi); exofs_free_sbi(sbi);
sb->s_fs_info = NULL; sb->s_fs_info = NULL;
} }
...@@ -809,8 +808,12 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -809,8 +808,12 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
__sbi_read_stats(sbi); __sbi_read_stats(sbi);
/* set up operation vectors */ /* set up operation vectors */
sbi->bdi.ra_pages = __ra_pages(&sbi->layout); ret = super_setup_bdi(sb);
sb->s_bdi = &sbi->bdi; if (ret) {
EXOFS_DBGMSG("Failed to super_setup_bdi\n");
goto free_sbi;
}
sb->s_bdi->ra_pages = __ra_pages(&sbi->layout);
sb->s_fs_info = sbi; sb->s_fs_info = sbi;
sb->s_op = &exofs_sops; sb->s_op = &exofs_sops;
sb->s_export_op = &exofs_export_ops; sb->s_export_op = &exofs_export_ops;
...@@ -836,14 +839,6 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -836,14 +839,6 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
goto free_sbi; goto free_sbi;
} }
ret = bdi_setup_and_register(&sbi->bdi, "exofs");
if (ret) {
EXOFS_DBGMSG("Failed to bdi_setup_and_register\n");
dput(sb->s_root);
sb->s_root = NULL;
goto free_sbi;
}
exofs_sysfs_dbg_print(); exofs_sysfs_dbg_print();
_exofs_print_device("Mounting", opts->dev_name, _exofs_print_device("Mounting", opts->dev_name,
ore_comp_dev(&sbi->oc, 0), ore_comp_dev(&sbi->oc, 0),
......
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