Bug ID | 1025052 |
---|---|
Summary | [PATCH] btrfs: allow dedupe of same inode |
Classification | openSUSE |
Product | openSUSE Distribution |
Version | Leap 42.1 |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Kernel |
Assignee | jeffm@suse.com |
Reporter | jeffm@suse.com |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
From 0efa9f48c7e6c15e75946dd2b1c82d3d19e13545 Mon Sep 17 00:00:00 2001 From: Mark Fasheh <mfasheh@suse.de> Date: Tue, 30 Jun 2015 14:42:07 -0700 Subject: [PATCH] btrfs: allow dedupe of same inode Patch-mainline: v4.2 Git-commit: 0efa9f48c7e6c15e75946dd2b1c82d3d19e13545 References: SLE12-SP1 commit d5b3732e107 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> Signed-off-by: Chris Mason <clm@fb.com> --- fs/btrfs/ioctl.c | 78 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 17 deletions(-)