btrfs: Introduce extent_read_full_page_nolock()
authorMark Fasheh <mfasheh@suse.de>
Tue, 6 Aug 2013 18:42:50 +0000 (11:42 -0700)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:04:59 +0000 (08:04 -0400)
commit4b384318a74e38eb248f74f9a92a700d2ce841f1
tree5ef01855a2824b7c832e9303a19cfb2527c9d08d
parent32b7c687c52a0b78a7d41ce6423c2fd8f5ca92da
btrfs: Introduce extent_read_full_page_nolock()

We want this for btrfs_extent_same. Basically readpage and friends do their
own extent locking but for the purposes of dedupe, we want to have both
files locked down across a set of readpage operations (so that we can
compare data). Introduce this variant and a flag which can be set for
extent_read_full_page() to indicate that we are already locked.

Partial credit for this patch goes to Gabriel de Perthuis <g2p.code@gmail.com>
as I have included a fix from him to the original patch which avoids a
deadlock on compressed extents.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/compression.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h