From patchwork Wed Oct 8 00:23:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marios Titas X-Patchwork-Id: 5050781 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFAD3C11AB for ; Wed, 8 Oct 2014 00:23:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C80C4201FB for ; Wed, 8 Oct 2014 00:23:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C956620107 for ; Wed, 8 Oct 2014 00:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755470AbaJHAXr (ORCPT ); Tue, 7 Oct 2014 20:23:47 -0400 Received: from mout.gmx.net ([212.227.17.20]:58471 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755448AbaJHAXq (ORCPT ); Tue, 7 Oct 2014 20:23:46 -0400 Received: from localhost.localdomain ([93.96.201.217]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LlDx4-1YAAa62nBe-00b0G0 for ; Wed, 08 Oct 2014 02:23:44 +0200 Date: Wed, 8 Oct 2014 01:23:41 +0100 From: Marios Titas To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h Message-ID: <20141008002341.GA28669@zeno.lan> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1 (2013-10-16) X-Provags-ID: V03:K0:7/6lOD0S+cfy5Fv1RQma11glxVy7m6KsNGV22tdntsN7SBRRDUo 4OWwM+Kau+4uXlGgwt+hJnOwmCR7Rd159H3FC7JbppZHaH+xl13dHnz7AQmGoS9PJV3maSE Yl829nT1jzgVZOrf2Sc0i5a1Su2zQ+r6UFoZbB7FGGVegnd6P1GZdlbc3BoycHn7Oi99O7l BVbmePz0NRGREty8cCzxA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP include/uapi/linux/btrfs.h is a more logical place to put the struct btrfs_ioctl_defrag_range_args as it is being used by the BTRFS_IOC_DEFRAG_RANGE IOCTL which is defined in that file. Additionally, this is where the btrfs-progs defines that struct. Thus this patches reduces the gap between the btrfs-progs headers and the kernel headers. Signed-off-by: Marios Titas Reviewed-by: David Sterba --- fs/btrfs/ctree.h | 31 ------------------------------- include/uapi/linux/btrfs.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8e29b61..5e633cc 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1891,37 +1891,6 @@ struct btrfs_root { atomic_t will_be_snapshoted; }; -struct btrfs_ioctl_defrag_range_args { - /* start of the defrag operation */ - __u64 start; - - /* number of bytes to defrag, use (u64)-1 to say all */ - __u64 len; - - /* - * flags for the operation, which can include turning - * on compression for this one defrag - */ - __u64 flags; - - /* - * any extent bigger than this will be considered - * already defragged. Use 0 to take the kernel default - * Use 1 to say every single extent must be rewritten - */ - __u32 extent_thresh; - - /* - * which compression method to use if turning on compression - * for this defrag operation. If unspecified, zlib will - * be used - */ - __u32 compress_type; - - /* spare for later */ - __u32 unused[4]; -}; - /* * inode items have the data typically returned from stat and store other diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 2f47824..d0e5757 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -350,6 +350,37 @@ struct btrfs_ioctl_same_args { struct btrfs_ioctl_same_extent_info info[0]; }; +struct btrfs_ioctl_defrag_range_args { + /* start of the defrag operation */ + __u64 start; + + /* number of bytes to defrag, use (u64)-1 to say all */ + __u64 len; + + /* + * flags for the operation, which can include turning + * on compression for this one defrag + */ + __u64 flags; + + /* + * any extent bigger than this will be considered + * already defragged. Use 0 to take the kernel default + * Use 1 to say every single extent must be rewritten + */ + __u32 extent_thresh; + + /* + * which compression method to use if turning on compression + * for this defrag operation. If unspecified, zlib will + * be used + */ + __u32 compress_type; + + /* spare for later */ + __u32 unused[4]; +}; + struct btrfs_ioctl_space_info { __u64 flags; __u64 total_bytes;