vfs-7.1-rc1.bh.metadata
Please consider pulling these changes from the signed vfs-7.1-rc1.bh.metadata tag. Thanks! Christian -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCadjZCwAKCRCRxhvAZXjc os67AQCd65HW/XVVw01846OH5Cqw7vFYBa7HipkQPebX3NjCPgEAm4w8ywqKUe5o rRLkZVIDBgkMGhH7Af+y2Ru5WZZiLwc= =G3WM -----END PGP SIGNATURE----- Merge tag 'vfs-7.1-rc1.bh.metadata' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs buffer_head updates from Christian Brauner: "This cleans up the mess that has accumulated over the years in metadata buffer_head tracking for inodes. It moves the tracking into dedicated structure in filesystem-private part of the inode (so that we don't use private_list, private_data, and private_lock in struct address_space), and also moves couple other users of private_data and private_list so these are removed from struct address_space saving 3 longs in struct inode for 99% of inodes" * tag 'vfs-7.1-rc1.bh.metadata' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (42 commits) fs: Drop i_private_list from address_space fs: Drop mapping_metadata_bhs from address space ext4: Track metadata bhs in fs-private inode part minix: Track metadata bhs in fs-private inode part udf: Track metadata bhs in fs-private inode part fat: Track metadata bhs in fs-private inode part bfs: Track metadata bhs in fs-private inode part affs: Track metadata bhs in fs-private inode part ext2: Track metadata bhs in fs-private inode part fs: Provide functions for handling mapping_metadata_bhs directly fs: Switch inode_has_buffers() to take mapping_metadata_bhs fs: Make bhs point to mapping_metadata_bhs fs: Move metadata bhs tracking to a separate struct fs: Fold fsync_buffers_list() into sync_mapping_buffers() fs: Drop osync_buffers_list() kvm: Use private inode list instead of i_private_list fs: Remove i_private_data aio: Stop using i_private_data and i_private_lock hugetlbfs: Stop using i_private_data fs: Stop using i_private_data for metadata bh tracking ...
This commit is contained in:
commit
fc825e513c
65 changed files with 474 additions and 492 deletions
|
|
@ -30,6 +30,7 @@ struct gmem_file {
|
|||
struct gmem_inode {
|
||||
struct shared_policy policy;
|
||||
struct inode vfs_inode;
|
||||
struct list_head gmem_file_list;
|
||||
|
||||
u64 flags;
|
||||
};
|
||||
|
|
@ -39,8 +40,8 @@ static __always_inline struct gmem_inode *GMEM_I(struct inode *inode)
|
|||
return container_of(inode, struct gmem_inode, vfs_inode);
|
||||
}
|
||||
|
||||
#define kvm_gmem_for_each_file(f, mapping) \
|
||||
list_for_each_entry(f, &(mapping)->i_private_list, entry)
|
||||
#define kvm_gmem_for_each_file(f, inode) \
|
||||
list_for_each_entry(f, &GMEM_I(inode)->gmem_file_list, entry)
|
||||
|
||||
/**
|
||||
* folio_file_pfn - like folio_file_page, but return a pfn.
|
||||
|
|
@ -202,7 +203,7 @@ static void kvm_gmem_invalidate_begin(struct inode *inode, pgoff_t start,
|
|||
|
||||
attr_filter = kvm_gmem_get_invalidate_filter(inode);
|
||||
|
||||
kvm_gmem_for_each_file(f, inode->i_mapping)
|
||||
kvm_gmem_for_each_file(f, inode)
|
||||
__kvm_gmem_invalidate_begin(f, start, end, attr_filter);
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ static void kvm_gmem_invalidate_end(struct inode *inode, pgoff_t start,
|
|||
{
|
||||
struct gmem_file *f;
|
||||
|
||||
kvm_gmem_for_each_file(f, inode->i_mapping)
|
||||
kvm_gmem_for_each_file(f, inode)
|
||||
__kvm_gmem_invalidate_end(f, start, end);
|
||||
}
|
||||
|
||||
|
|
@ -609,7 +610,7 @@ static int __kvm_gmem_create(struct kvm *kvm, loff_t size, u64 flags)
|
|||
kvm_get_kvm(kvm);
|
||||
f->kvm = kvm;
|
||||
xa_init(&f->bindings);
|
||||
list_add(&f->entry, &inode->i_mapping->i_private_list);
|
||||
list_add(&f->entry, &GMEM_I(inode)->gmem_file_list);
|
||||
|
||||
fd_install(fd, file);
|
||||
return fd;
|
||||
|
|
@ -945,6 +946,7 @@ static struct inode *kvm_gmem_alloc_inode(struct super_block *sb)
|
|||
mpol_shared_policy_init(&gi->policy, NULL);
|
||||
|
||||
gi->flags = 0;
|
||||
INIT_LIST_HEAD(&gi->gmem_file_list);
|
||||
return &gi->vfs_inode;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue