diff options
| author | Josef Bacik <[email protected]> | 2024-04-03 21:29:40 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2024-05-07 19:31:10 +0000 |
| commit | 6b0a63a4fa3142d1cb0069b9c7bf02270412d96f (patch) | |
| tree | 738a4f7ed8ceb8cb196ab758d46923a13993eba1 /fs/btrfs/extent_io.c | |
| parent | btrfs: push extent lock down in submit_one_async_extent (diff) | |
| download | kernel-6b0a63a4fa3142d1cb0069b9c7bf02270412d96f.tar.gz kernel-6b0a63a4fa3142d1cb0069b9c7bf02270412d96f.zip | |
btrfs: add a cached state to extent_clear_unlock_delalloc
Now that we have the lock_extent tightly coupled with
extent_clear_unlock_delalloc we can add a cached state to
extent_clear_unlock_delalloc and benefit from skipping the extra lookup
when we're doing cow.
Reviewed-by: Goldwyn Rodrigues <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/extent_io.c')
| -rw-r--r-- | fs/btrfs/extent_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d76ba4099b79..47a5bb95a994 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -412,9 +412,10 @@ out_failed: void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end, struct page *locked_page, + struct extent_state **cached, u32 clear_bits, unsigned long page_ops) { - clear_extent_bit(&inode->io_tree, start, end, clear_bits, NULL); + clear_extent_bit(&inode->io_tree, start, end, clear_bits, cached); __process_pages_contig(inode->vfs_inode.i_mapping, locked_page, start, end, page_ops); |
