]> git.hungrycats.org Git - linux/commit
btrfs: allow dedupe of same inode
authorMark Fasheh <mfasheh@suse.de>
Tue, 23 Jun 2015 21:28:39 +0000 (14:28 -0700)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 1 Jul 2015 00:00:35 +0000 (20:00 -0400)
commit98b0327dd0493c845165bd2ddcad60d8868f9c19
tree8a715fb887ff21b61bd1a465056a4e9d57d941d8
parentc59e9ef10f856d03608157a8f737033e7cf9dcb1
btrfs: allow dedupe of same inode

clone() supports cloning within an inode so extent-same can do
the same now. This patch fixes up the locking in extent-same to
know about the single-inode case. In addition to that, we add a
check for overlapping ranges, which clone does not allow.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Reviewed-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit f14a311197d196d56a63c22443c0e6f2c94bf223)
fs/btrfs/ioctl.c