linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h
@ 2014-10-08  0:23 Marios Titas
  2014-10-09 15:44 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Marios Titas @ 2014-10-08  0:23 UTC (permalink / raw)
  To: linux-btrfs

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 <redneb@gmx.com>
---
  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;
-- 
2.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h
  2014-10-08  0:23 [PATCH] btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h Marios Titas
@ 2014-10-09 15:44 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2014-10-09 15:44 UTC (permalink / raw)
  To: Marios Titas; +Cc: linux-btrfs

On Wed, Oct 08, 2014 at 01:23:41AM +0100, Marios Titas wrote:
> 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 <redneb@gmx.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-09 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08  0:23 [PATCH] btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h Marios Titas
2014-10-09 15:44 ` David Sterba

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).