summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-03 17:24:40 +0200
committerDavid Sterba <dsterba@suse.com>2023-06-19 13:59:28 +0200
commitd7172f52e9933b6ec9305e7fe6e829e3939dba04 (patch)
tree62101cc94eccc2825aa1c6ac82c6a5340e65dfa4 /fs/btrfs/extent_io.h
parent9e2aff90fc2ad2b94933762f5442fef9ee7a692e (diff)
downloadlinux-d7172f52e9933b6ec9305e7fe6e829e3939dba04.tar.gz
linux-d7172f52e9933b6ec9305e7fe6e829e3939dba04.tar.bz2
linux-d7172f52e9933b6ec9305e7fe6e829e3939dba04.zip
btrfs: use per-buffer locking for extent_buffer reading
Instead of locking and unlocking every page or the extent, just add a new EXTENT_BUFFER_READING bit that mirrors EXTENT_BUFFER_WRITEBACK for synchronizing threads trying to read an extent_buffer and to wait for I/O completion. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 217c433bb999..2d91ca91dca5 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -29,6 +29,8 @@ enum {
/* write IO error */
EXTENT_BUFFER_WRITE_ERR,
EXTENT_BUFFER_NO_CHECK,
+ /* Indicate that extent buffer pages a being read */
+ EXTENT_BUFFER_READING,
};
/* these are flags for __process_pages_contig */