]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: don't cap maximum dedupe request length
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Jan 2017 15:38:57 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:44 +0000 (11:39 +0100)
commit 1bb33a98702d8360947f18a44349df75ba555d5d upstream.

After various discussions on linux-fsdevel, it has been decided that it
is not necessary to cap the length of a dedupe request, and that
correctly-written userspace client programs will be able to absorb the
change.  Therefore, remove the length clamping behavior.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_file.c

index 6e4f7f900fea4c30f44477dc258db5334b980486..9a5d64b5f35a1d82b2112a7b07998d7063584405 100644 (file)
@@ -939,7 +939,6 @@ xfs_file_clone_range(
                                     len, false);
 }
 
-#define XFS_MAX_DEDUPE_LEN     (16 * 1024 * 1024)
 STATIC ssize_t
 xfs_file_dedupe_range(
        struct file     *src_file,
@@ -950,14 +949,6 @@ xfs_file_dedupe_range(
 {
        int             error;
 
-       /*
-        * Limit the total length we will dedupe for each operation.
-        * This is intended to bound the total time spent in this
-        * ioctl to something sane.
-        */
-       if (len > XFS_MAX_DEDUPE_LEN)
-               len = XFS_MAX_DEDUPE_LEN;
-
        error = xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff,
                                     len, true);
        if (error)