diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-08 22:50:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-08 22:50:30 -0400 |
commit | e3a7cee5034f0f218f593a0a970e8ccd8bf99565 (patch) | |
tree | c5c9b4d57f74d19594a082f0085206e2118bed46 /fs/bcachefs/super.c | |
parent | 86ab56339cbcbf9941fc2aef6838600a7c1ab2d4 (diff) |
bcachefs: Don't mark superblocks past end of usable spacebcachefs-v5.11
bcachefs-tools recently started putting a backup superblock at the end
of the device. This causes a problem if the bucket size doesn't divide
the device size - but we can fix it by just skipping marking that part.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r-- | fs/bcachefs/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 4c6793639fc4..2a570eb0763e 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -1826,6 +1826,11 @@ int bch2_dev_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets) goto err; } + ret = bch2_trans_mark_dev_sb(c, ca); + if (ret) { + goto err; + } + mutex_lock(&c->sb_lock); mi = &bch2_sb_get_members(c->disk_sb.sb)->members[ca->dev_idx]; mi->nbuckets = cpu_to_le64(nbuckets); |