bcachefs: Plumb through subvolume id
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 16 Mar 2021 04:28:17 +0000 (00:28 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:12 +0000 (17:09 -0400)
commit6fed42bb7750e217b0d1169ccfccc7639a3e1d3f
tree88e8f85e58cd7c68b86c6e804c99a2aebcbb74d0
parentc075ff700ff397671636bf45f6ef6ef330258d3e
bcachefs: Plumb through subvolume id

To implement snapshots, we need every filesystem btree operation (every
btree operation without a subvolume) to start by looking up the
subvolume and getting the current snapshot ID, with
bch2_subvolume_get_snapshot() - then, that snapshot ID is used for doing
btree lookups in BTREE_ITER_FILTER_SNAPSHOTS mode.

This patch adds those bch2_subvolume_get_snapshot() calls, and also
switches to passing around a subvol_inum instead of just an inode
number.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
23 files changed:
fs/bcachefs/acl.c
fs/bcachefs/acl.h
fs/bcachefs/dirent.c
fs/bcachefs/dirent.h
fs/bcachefs/extents.c
fs/bcachefs/extents.h
fs/bcachefs/fs-common.c
fs/bcachefs/fs-common.h
fs/bcachefs/fs-io.c
fs/bcachefs/fs-ioctl.c
fs/bcachefs/fs.c
fs/bcachefs/fs.h
fs/bcachefs/fsck.c
fs/bcachefs/inode.c
fs/bcachefs/inode.h
fs/bcachefs/io.c
fs/bcachefs/move.c
fs/bcachefs/recovery.c
fs/bcachefs/reflink.c
fs/bcachefs/reflink.h
fs/bcachefs/str_hash.h
fs/bcachefs/xattr.c
fs/bcachefs/xattr.h