• Kent Overstreet's avatar
    bcachefs: Add subvolume to ei_inode_info · 284ae18c
    Kent Overstreet authored
    Filesystem operations generally operate within a subvolume: at the start
    of every btree transaction we'll be looking up (and locking) the
    subvolume to get the current snapshot ID, which we then use for our
    other btree lookups in BTREE_ITER_FILTER_SNAPSHOTS mode.
    
    But inodes don't record what subvolume they're in - they can't, because
    if they did we'd have to update every single inode within a subvolume
    when taking a snapshot in order to keep that field up to date. So it
    needs to be tracked in memory, based on how we got to that inode.
    
    Hence this patch adds a subvolume field to ei_inode_info, and switches
    to iget5() so we can index by it in the inode hash table.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    284ae18c
fs-ioctl.c 7.76 KB