]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make subpage metadata write path call its own endio functions
authorQu Wenruo <wqu@suse.com>
Tue, 27 Apr 2021 04:53:35 +0000 (12:53 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:08 +0000 (15:19 +0200)
commit27077f1620525686955c70ff70023bf35e6ab35e
treeec367291cfe57947b46cc06cff40b819e238a3f9
parent20e8b1a4b9b4248074dd30b77f21835800f33e2b
btrfs: make subpage metadata write path call its own endio functions

For subpage metadata, we're reusing two functions for subpage metadata
write:

- end_bio_extent_buffer_writepage()
- write_one_eb()

But the truth is, for subpage we just call
end_bio_subpage_eb_writepage() without using any bit in
end_bio_extent_buffer_writepage().

For write_one_eb(), it's pretty similar, but with a small part of code
reused.

There is really no need to pollute the existing code path if we're not
really using most of them.

So this patch will do the following change to separate the subpage
metadata write path from regular write path by:

- Use end_bio_subpage_eb_writepage() directly as endio in
  write_one_subpage_eb()
- Directly call write_one_subpage_eb() in submit_eb_subpage()

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c