]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce helpers for subpage uptodate status
authorQu Wenruo <wqu@suse.com>
Tue, 26 Jan 2021 08:33:52 +0000 (16:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:59:02 +0000 (22:59 +0100)
commit6400097a339bb25f8aef924b0ff3b58fa467e1a2
tree73d31da7b5eceefaf5784e9db884d9f53e24a721
parent7dbb96e4cc2fed5f1160de7e673c1d692e46ab4f
btrfs: introduce helpers for subpage uptodate status

Introduce the following functions to handle subpage uptodate status:

- btrfs_subpage_set_uptodate()
- btrfs_subpage_clear_uptodate()
- btrfs_subpage_test_uptodate()
  These helpers can only be called when the page has subpage attached
  and the range is ensured to be inside the page.

- btrfs_page_set_uptodate()
- btrfs_page_clear_uptodate()
- btrfs_page_test_uptodate()
  These helpers can handle both regular sector size and subpage.
  Although caller should still ensure that the range is inside the page.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
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