]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: subpage: introduce helpers for writeback status
authorQu Wenruo <wqu@suse.com>
Thu, 25 Mar 2021 07:14:38 +0000 (15:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:58 +0000 (15:35 +0200)
commit3c9494aefccbcda2cf94d4fcf15f91030f6f196a
treeff6c89efab9eacdb12d5a5c16df223425f83320c
parent29e73cd671803e954f5402a8255dacf6dd2522a8
btrfs: subpage: introduce helpers for writeback status

Introduces the following functions to handle subpage writeback status:

- btrfs_subpage_set_writeback()
- btrfs_subpage_clear_writeback()
- btrfs_subpage_test_writeback()
  These helpers can only be called when the range is ensured to be
  inside the page.

- btrfs_page_set_writeback()
- btrfs_page_clear_writeback()
- btrfs_page_test_writeback()
  These helpers can handle both regular sector size and subpage without
  problem.

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/subpage.c
fs/btrfs/subpage.h