]> git.baikalelectronics.ru Git - kernel.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>
Mon, 19 Apr 2021 15:25:18 +0000 (17:25 +0200)
commit3441da105ebc1a49245dc0a1382fd7174980cc0a
tree6d9cef321e1d3c5519a22e13e508b4218c84ef5c
parentbdf63a0eb551652062f605afa3651a592c91699c
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