diff options
author | Arne Jansen <sensille@gmx.net> | 2011-06-10 14:06:53 +0200 |
---|---|---|
committer | Arne Jansen <sensille@gmx.net> | 2011-10-02 08:47:55 +0200 |
commit | bb82ab88dfdb12948af58989c75bfe904bc1b09d (patch) | |
tree | 1311f5b5ec398cad99aa0da120aed0ee8a224a36 /fs/btrfs/extent_io.h | |
parent | 286d6e70aa6cf0f0235653eb1049bfc04610b4fb (diff) | |
download | talos-obmc-linux-bb82ab88dfdb12948af58989c75bfe904bc1b09d.tar.gz talos-obmc-linux-bb82ab88dfdb12948af58989c75bfe904bc1b09d.zip |
btrfs: add an extra wait mode to read_extent_buffer_pages
read_extent_buffer_pages currently has two modes, either trigger a read
without waiting for anything, or wait for the I/O to finish. The former
also bails when it's unable to lock the page. This patch now adds an
additional parameter to allow it to block on page lock, but don't wait
for completion.
Changes v5:
- merge the 2 wait parameters into one and define WAIT_NONE, WAIT_COMPLETE and
WAIT_PAGE_LOCK
Change v6:
- fix bug introduced in v5
Signed-off-by: Arne Jansen <sensille@gmx.net>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 7b2f0c3e7929..6d74c6b34691 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -248,6 +248,9 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, u64 start, unsigned long len); void free_extent_buffer(struct extent_buffer *eb); +#define WAIT_NONE 0 +#define WAIT_COMPLETE 1 +#define WAIT_PAGE_LOCK 2 int read_extent_buffer_pages(struct extent_io_tree *tree, struct extent_buffer *eb, u64 start, int wait, get_extent_t *get_extent, int mirror_num); |