diff options
| author | Alex Gartrell <[email protected]> | 2014-05-20 20:07:56 +0000 |
|---|---|---|
| committer | Chris Mason <[email protected]> | 2014-06-10 00:20:57 +0000 |
| commit | fc4adbff823f76577ece26dcb88bf6f8392dbd43 (patch) | |
| tree | d3708c9b2f6e3023a7da4452d90f65e99a007213 /fs/btrfs/btrfs_inode.h | |
| parent | Btrfs: cut down stack usage in btree_write_cache_pages (diff) | |
| download | kernel-fc4adbff823f76577ece26dcb88bf6f8392dbd43.tar.gz kernel-fc4adbff823f76577ece26dcb88bf6f8392dbd43.zip | |
btrfs: Drop EXTENT_UPTODATE check in hole punching and direct locking
In these instances, we are trying to determine if a page has been accessed
since we began the operation for the sake of retry. This is easily
accomplished by doing a gang lookup in the page mapping radix tree, and it
saves us the dependency on the flag (so that we might eventually delete
it).
btrfs_page_exists_in_range borrows heavily from find_get_page, replacing
the radix tree look up with a gang lookup of 1, so that we can find the
next highest page >= index and see if it falls into our lock range.
Signed-off-by: Chris Mason <[email protected]>
Signed-off-by: Alex Gartrell <[email protected]>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
| -rw-r--r-- | fs/btrfs/btrfs_inode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index c9a24444ec9a..a0cf3e56fe20 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -284,4 +284,6 @@ static inline void btrfs_inode_resume_unlocked_dio(struct inode *inode) &BTRFS_I(inode)->runtime_flags); } +bool btrfs_page_exists_in_range(struct inode *inode, loff_t start, loff_t end); + #endif |
