diff options
author | Qu Wenruo <wqu@suse.com> | 2021-04-06 03:36:01 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-04-19 18:25:22 +0300 |
commit | 35b6ddfa9626d1461d54eb203e9b6021d97dd13c (patch) | |
tree | 413323e3b4fee02f69f3ea3eabb92309065ae91c /lib/mpi/mpi-sub-ui.c | |
parent | 2f3186d8eed5ef6c9234b05c0e67023fec6edd4d (diff) | |
download | linux-35b6ddfa9626d1461d54eb203e9b6021d97dd13c.tar.xz |
btrfs: introduce write_one_subpage_eb() function
The new function, write_one_subpage_eb(), as a subroutine for subpage
metadata write, will handle the extent buffer bio submission.
The major differences between the new write_one_subpage_eb() and
write_one_eb() is:
- No page locking
When entering write_one_subpage_eb() the page is no longer locked.
We only lock the page for its status update, and unlock immediately.
Now we completely rely on extent io tree locking.
- Extra bitmap update along with page status update
Now page dirty and writeback is controlled by
btrfs_subpage::dirty_bitmap and btrfs_subpage::writeback_bitmap.
They both follow the schema that any sector is dirty/writeback, then
the full page gets dirty/writeback.
- When to update the nr_written number
Now we take a shortcut, if we have cleared the last dirty bit of the
page, we update nr_written.
This is not completely perfect, but should emulate the old behavior
well enough.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions