scoutfs: make sure to set the sb blocksize

Since fill_super was originally written we've added use of buffer_head
IO by the btree and quorum voting.  We forgot to set the block size so
devices that didn't have the common 4k default, matching our block size,
would see errors.  Explicitly set it.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2019-04-29 12:19:35 -07:00
committed by Zach Brown
parent 6342bd5679
commit 7097d545cf

View File

@@ -343,13 +343,19 @@ static int scoutfs_fill_super(struct super_block *sb, void *data, int silent)
INIT_DELAYED_WORK(&sbi->trans_write_work, scoutfs_trans_write_func);
init_waitqueue_head(&sbi->trans_write_wq);
ret = scoutfs_parse_options(sb, data, &opts);
if (ret)
goto out;
sbi->opts = opts;
ret = sb_set_blocksize(sb, SCOUTFS_BLOCK_SIZE);
if (ret != SCOUTFS_BLOCK_SIZE) {
scoutfs_err(sb, "failed to set blocksize, returned %d", ret);
ret = -EIO;
goto out;
}
ret = scoutfs_setup_sysfs(sb) ?:
scoutfs_setup_counters(sb) ?:
scoutfs_read_super(sb, &SCOUTFS_SB(sb)->super) ?: