linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 10/10] btrfs: defrag: enable defrag for subpage case
Date: Wed,  2 Jun 2021 10:15:28 +0800	[thread overview]
Message-ID: <20210602021528.68617-11-wqu@suse.com> (raw)
In-Reply-To: <20210602021528.68617-1-wqu@suse.com>

With the new infrasturture which has taken subpage into consideration,
now we should be safe to allow defrag to work for subpage case.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/ioctl.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index be39ce0f3f9d..f0618756d4d9 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2970,12 +2970,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
 		goto out;
 	}
 
-	/* Subpage defrag will be supported in later commits */
-	if (root->fs_info->sectorsize < PAGE_SIZE) {
-		ret = -ENOTTY;
-		goto out;
-	}
-
 	switch (inode->i_mode & S_IFMT) {
 	case S_IFDIR:
 		if (!capable(CAP_SYS_ADMIN)) {
-- 
2.31.1


      parent reply	other threads:[~2021-06-02  2:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  2:15 [PATCH v2 00/10] btrfs: defrag: rework to support sector perfect defrag Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 01/10] btrfs: defrag: pass file_ra_state instead of file for btrfs_defrag_file() Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 02/10] btrfs: defrag: extract the page preparation code into one helper Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 03/10] btrfs: defrag: replace hard coded PAGE_SIZE to sectorsize for defrag_lookup_extent() Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 04/10] btrfs: defrag: introduce a new helper to collect target file extents Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 05/10] btrfs: defrag: introduce a helper to defrag a continuous prepared range Qu Wenruo
2021-06-08  1:40   ` Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 06/10] btrfs: defrag: introduce a helper to defrag a range Qu Wenruo
2021-06-08  2:35   ` Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 07/10] btrfs: defrag: introduce a new helper to defrag one cluster Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 08/10] btrfs: defrag: use defrag_one_cluster() to implement btrfs_defrag_file() Qu Wenruo
2021-06-02  2:15 ` [PATCH v2 09/10] btrfs: defrag: remove the old infrastructure Qu Wenruo
2021-06-02  2:15 ` Qu Wenruo [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=20210602021528.68617-11-wqu@suse.com \
    --to=wqu@suse.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).