The function implementing the dedup ioctl
i.e. btrfs_ioctl_file_extent_same(), returns with an error in
subpagesize-blocksize scenario. This was done due to the fact that Btrfs
did not have code to deal with block size < page size. This commit
removes this restriction since we now support "block size < page size".

Signed-off-by: Chandan Rajendra <chan...@linux.vnet.ibm.com>
---
 fs/btrfs/ioctl.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index b209415..ab47cfa 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3191,7 +3191,6 @@ static long btrfs_ioctl_file_extent_same(struct file 
*file,
        int i;
        int ret;
        unsigned long size;
-       u64 bs = BTRFS_I(src)->root->fs_info->sb->s_blocksize;
        bool is_admin = capable(CAP_SYS_ADMIN);
        u16 count;
 
@@ -3228,16 +3227,6 @@ static long btrfs_ioctl_file_extent_same(struct file 
*file,
        if (len > BTRFS_MAX_DEDUPE_LEN)
                len = BTRFS_MAX_DEDUPE_LEN;
 
-       if (WARN_ON_ONCE(bs < PAGE_CACHE_SIZE)) {
-               /*
-                * Btrfs does not support blocksize < page_size. As a
-                * result, btrfs_cmp_data() won't correctly handle
-                * this situation without an update.
-                */
-               ret = -EINVAL;
-               goto out;
-       }
-
        ret = -EISDIR;
        if (S_ISDIR(src->i_mode))
                goto out;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to