From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: clm@fb.com, jbacik@fb.com, bo.li.liu@oracle.com, dsterba@suse.cz
Cc: Chandan Rajendra <chandan@linux.vnet.ibm.com>,
aneesh.kumar@linux.vnet.ibm.com, linux-btrfs@vger.kernel.org,
chandan@mykolab.com
Subject: [PATCH V14 15/15] Btrfs: subpagesize-blocksize: Enable dedup ioctl
Date: Thu, 4 Feb 2016 12:16:22 +0530 [thread overview]
Message-ID: <1454568382-2020-16-git-send-email-chandan@linux.vnet.ibm.com> (raw)
In-Reply-To: <1454568382-2020-1-git-send-email-chandan@linux.vnet.ibm.com>
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(-)
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
prev parent reply other threads:[~2016-02-04 6:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 6:46 [PATCH V14 00/15] Btrfs: Subpagesize-blocksize: Allow I/O on blocks whose size is less than page size Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 01/15] Btrfs: subpagesize-blocksize: Fix whole page read Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 02/15] Btrfs: subpagesize-blocksize: Fix whole page write Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 03/15] Btrfs: subpagesize-blocksize: Make sure delalloc range intersects with the locked page's range Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 04/15] Btrfs: subpagesize-blocksize: Define extent_buffer_head Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 05/15] Btrfs: subpagesize-blocksize: Read tree blocks whose size is < PAGE_SIZE Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 06/15] Btrfs: subpagesize-blocksize: Write only dirty extent buffers belonging to a page Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 07/15] Btrfs: subpagesize-blocksize: Allow mounting filesystems where sectorsize != PAGE_SIZE Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 08/15] Btrfs: subpagesize-blocksize: Deal with partial ordered extent allocations Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 09/15] Btrfs: subpagesize-blocksize: Explicitly track I/O status of blocks of an ordered extent Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 10/15] Btrfs: subpagesize-blocksize: btrfs_punch_hole: Fix uptodate blocks check Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 11/15] Btrfs: subpagesize-blocksize: Prevent writes to an extent buffer when PG_writeback flag is set Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 12/15] Revert "btrfs: fix lockups from btrfs_clear_path_blocking" Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 13/15] Btrfs: subpagesize-blocksize: Fix file defragmentation code Chandan Rajendra
2016-02-04 6:46 ` [PATCH V14 14/15] Btrfs: subpagesize-blocksize: extent_clear_unlock_delalloc: Prevent page from being unlocked more than once Chandan Rajendra
2016-02-04 6:46 ` Chandan Rajendra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454568382-2020-16-git-send-email-chandan@linux.vnet.ibm.com \
--to=chandan@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=bo.li.liu@oracle.com \
--cc=chandan@mykolab.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).