[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250423154531.376838-1-contact@arnaud-lcm.com>
Date: Wed, 23 Apr 2025 17:45:31 +0200
From: Arnaud Lecomte <contact@...aud-lcm.com>
To: syzbot+843981bb836d699c07d1@...kaller.appspotmail.com
Cc: kent.overstreet@...ux.dev,
linux-bcachefs@...r.kernel.org,
linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Sub volumes handling in bch2_fsck_update_backpointers
Hey everyone, in fsck.c, we have:
/*
* Prefer to delete the first one, since that will be the one at the wrong
* offset:
* return value: 0 -> delete k1, 1 -> delete k2
*/
int bch2_fsck_update_backpointers(struct btree_trans *trans,
struct snapshots_seen *s,
const struct bch_hash_desc desc,
struct bch_hash_info *hash_info,
struct bkey_i *new)
{
if (new->k.type != KEY_TYPE_dirent)
return 0;
struct bkey_i_dirent *d = bkey_i_to_dirent(new);
struct inode_walker target = inode_walker_init();
int ret = 0;
if (d->v.d_type == DT_SUBVOL) {
BUG();
} else {
ret = get_visible_inodes(trans, &target, s, le64_to_cpu(d->v.d_inum));
if (ret)
goto err;
darray_for_each(target.inodes, i) {
i->inode.bi_dir_offset = d->k.p.offset;
ret = __bch2_fsck_write_inode(trans, &i->inode);
if (ret)
goto err;
}
}
err:
inode_walker_exit(&target);
return ret;
}
What is the current state for handling subvolumes ? In someone already working on or it is something we don't want to implement
for some reasons ?
Regards,
Arnaud
Powered by blists - more mailing lists