summaryrefslogtreecommitdiff
path: root/fs/btrfs/ordered-data.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-05-31 11:50:46 +0300
committerDavid Sterba <dsterba@suse.com>2021-06-21 16:19:10 +0300
commitb945a4637ec72a8ed0e526580a136d24f11abde1 (patch)
treea410675d955e6a742f8ad4d0a41725db980e578d /fs/btrfs/ordered-data.c
parent6f17400bd92e82ad549ea5374ffc71e35e2e4ee5 (diff)
downloadlinux-b945a4637ec72a8ed0e526580a136d24f11abde1.tar.xz
btrfs: make page Ordered bit to be subpage compatible
This involves the following modification: - Ordered extent creation This is done in process_one_page(), now PAGE_SET_ORDERED will call subpage helper to do the work. - endio functions This is done in btrfs_mark_ordered_io_finished(). - btrfs_invalidatepage() - btrfs_cleanup_ordered_extents() Use the subpage page helper, and add an extra branch to exit if the locked page have covered the full range. Now the usage of page Ordered flag for ordered extent accounting is fully subpage compatible. Tested-by: Ritesh Harjani <riteshh@linux.ibm.com> # [ppc64] Tested-by: Anand Jain <anand.jain@oracle.com> # [aarch64] Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r--fs/btrfs/ordered-data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index b1b377ad99a0..6eb41b7c0c84 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -16,6 +16,7 @@
#include "compression.h"
#include "delalloc-space.h"
#include "qgroup.h"
+#include "subpage.h"
static struct kmem_cache *btrfs_ordered_extent_cache;
@@ -395,11 +396,11 @@ void btrfs_mark_ordered_io_finished(struct btrfs_inode *inode,
*
* If there's no such bit, we need to skip to next range.
*/
- if (!PageOrdered(page)) {
+ if (!btrfs_page_test_ordered(fs_info, page, cur, len)) {
cur += len;
continue;
}
- ClearPageOrdered(page);
+ btrfs_page_clear_ordered(fs_info, page, cur, len);
}
/* Now we're fine to update the accounting */