]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Drop EXTENT_UPTODATE check in hole punching and direct locking
authorAlex Gartrell <agartrell@fb.com>
Tue, 20 May 2014 20:07:56 +0000 (13:07 -0700)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:57 +0000 (17:20 -0700)
commit680bc40e5da07b13a4aea53e09918b26cf74bbbd
treed3708c9b2f6e3023a7da4452d90f65e99a007213
parentd8c35d76d7cdeb6f07feccab8a6d2bd7fdb909f7
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 <clm@fb.com>
Signed-off-by: Alex Gartrell <agartrell@fb.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/file.c
fs/btrfs/inode.c