forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs: introduce subpage_eb_mapping for extent buffers
One of the design blockage for subpage support is the btree inode page::private mapping. Currently page::private for btree inode is a pointer to extent buffer who owns this page. This is fine for sectorsize == PAGE_SIZE case, but not suitable for subpage size support, as in that case one page can hold multiple tree blocks. So to support subpage, here we introduce a new structure, subpage_eb_mapping, to record how many extent buffers are referring to one page. It uses a bitmap (at most 16 bits used) to record tree blocks, and a extent buffer pointers array (at most 16 too) to record the owners. This patch will modify the following functions to add subpage support using subpage_eb_mapping structure: - attach_extent_buffer_page() - detach_extent_buffer_page() - grab_extent_buffer_from_page() - try_release_extent_buffer() Signed-off-by: Qu Wenruo <wqu@suse.com>
- Loading branch information
1 parent
08b7c7d
commit 3ef1cb4
Showing
2 changed files
with
212 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters