diff mbox

[2/2,RFC] btrfs: btrfs_defrag_root() doesn't defrag extent root tree

Message ID 20161221074208.32597-2-anand.jain@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

Anand Jain Dec. 21, 2016, 7:42 a.m. UTC
Since btrfs_defrag_leaves() does not support extent_root,
remove its corresponding call. The user can use the file
based defrag to defrag extents as of now.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Sterba Jan. 3, 2017, 4:24 p.m. UTC | #1
On Wed, Dec 21, 2016 at 03:42:08PM +0800, Anand Jain wrote:
> Since btrfs_defrag_leaves() does not support extent_root,
> remove its corresponding call. The user can use the file
> based defrag to defrag extents as of now.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Reviewed-by: David Sterba <dsterba@suse.com>

Oh right, btrfs_defrag_leaves even explicitly checks for extent_root, so
this has never worked anyway, safe to remove.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index bd1bb7fcea8a..112456baffe9 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2613,9 +2613,6 @@  static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
 			goto out;
 		}
 		ret = btrfs_defrag_root(root);
-		if (ret)
-			goto out;
-		ret = btrfs_defrag_root(root->fs_info->extent_root);
 		break;
 	case S_IFREG:
 		if (!(file->f_mode & FMODE_WRITE)) {