@@ -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;
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 <chandan@linux.vnet.ibm.com> --- fs/btrfs/ioctl.c | 11 ----------- 1 file changed, 11 deletions(-)