From patchwork Tue Jan 29 06:04:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Brandenburger X-Patchwork-Id: 2059381 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4ECA7DF23E for ; Tue, 29 Jan 2013 06:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753607Ab3A2GFT (ORCPT ); Tue, 29 Jan 2013 01:05:19 -0500 Received: from mail-ob0-f201.google.com ([209.85.214.201]:36019 "EHLO mail-ob0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753568Ab3A2GFR (ORCPT ); Tue, 29 Jan 2013 01:05:17 -0500 Received: by mail-ob0-f201.google.com with SMTP id un3so14874obb.4 for ; Mon, 28 Jan 2013 22:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=KuMkYtRIHU5uzYcPPGv3RO6iNxtvgn+JHjMEzYvABr8=; b=DtBYfof/aS20sOg+YYZzkgYVXbK8dAhGU3h7RNqVqTc3m+CmFS9u9hA2VnPBjCXrYH kkFfx5bH9GV3ZsUzuwF8xGZh7CNQoAhixetU67+knmlWxfL/LBEzJmmJgrEW71weHV0I lU6yLmmqdtP+1oue8haHTXjhUIq1BiwhuGL07649zZuz1Nkak+CTj0worRXlWYUrC3TQ /FrgKGUT76vel5vdovoQUlnF7M7ixNKhyn+ko19q//sm/2gnbhr20KRqYtalKfYKB/DB NpukRyt0SuPPodfpvnkiWF83MMjoSVuaRXtxxTlS35SOiKNJ0TfnDyu4+UmPnxmcgjQB 81wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=KuMkYtRIHU5uzYcPPGv3RO6iNxtvgn+JHjMEzYvABr8=; b=EfhampH4q6mbGF8gYXuanNdPt8NY2hJfyqlJ1skToRDaR6fxu5IsERy0MBeSUJ+u99 IyeVPpXCQ+k0l6MLf9kJbkqdrRbjVDcySQi/XJB1AzvBGSVyljyL/4wXu/Ba9h4q1O1D KFvX4A+Id+VfP2WewDzXboLIvaZRb7y3GPLn5m0zZ4g8p9iiOkpV0E7/g/grjhdDqi3Y MY4H2X7XIdEkrE7pvSBcEKwXzm92c49I5fWTJqe73+cwazMp50q9LpEc7SmQtbsPpUjE qT/djxxl5Qe9K6ytxRqQ+s/3OjT5wJt8pLnKjDdkmeGEuQevUf1lUpJYoouhR7oM6cWg WhjQ== X-Received: by 10.42.38.76 with SMTP id b12mr289629ice.30.1359439516918; Mon, 28 Jan 2013 22:05:16 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id xc3si114557igb.2.2013.01.28.22.05.16 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 28 Jan 2013 22:05:16 -0800 (PST) Received: from obelix.sbo.corp.google.com (obelix.sbo.corp.google.com [172.31.172.210]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 406A631C00F; Mon, 28 Jan 2013 22:05:16 -0800 (PST) Received: by obelix.sbo.corp.google.com (Postfix, from userid 180819) id BC0452016A6; Mon, 28 Jan 2013 22:05:15 -0800 (PST) From: Filipe Brandenburger To: Chris Mason , Josef Bacik Cc: linux-btrfs@vger.kernel.org, Filipe Brandenburger Subject: [PATCH] Btrfs: move fs/btrfs/ioctl.h to include/uapi/linux/btrfs.h Date: Mon, 28 Jan 2013 22:04:50 -0800 Message-Id: <1359439490-4012-2-git-send-email-filbranden@google.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1359439490-4012-1-git-send-email-filbranden@google.com> References: <1359439490-4012-1-git-send-email-filbranden@google.com> X-Gm-Message-State: ALoCoQnPeW0b+i2Y4MoIMl8Tj4CFjG9TJKaJKLkJfarl7qTQ9E9q90rtvmyYwWKSd9fopOq2XNq48yB6eTCDhYiarGfAW/VGpRnO40vYKAK6O/gdtQN22mGHRz972+AY0+udzVIHlU36ksKuasZe4TsRJc73QtCgAhJTn6b3QOQYiuq5RB0KV0LBtp3QGwGQeRGhOqrRYi2uJfZqK1EQtRy7rOZhe4mF3g== Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The header file will then be installed under /usr/include/linux so that userspace applications can refer to Btrfs ioctls by name and use the same structs used internally in the kernel. Signed-off-by: Filipe Brandenburger --- fs/btrfs/backref.h | 2 +- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/qgroup.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/volumes.h | 2 +- include/linux/btrfs.h | 6 ++++++ include/uapi/linux/Kbuild | 1 + fs/btrfs/ioctl.h => include/uapi/linux/btrfs.h | 7 ++++--- 11 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 include/linux/btrfs.h rename fs/btrfs/ioctl.h => include/uapi/linux/btrfs.h (99%) diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h index d61feca7..310a7f6 100644 --- a/fs/btrfs/backref.h +++ b/fs/btrfs/backref.h @@ -19,7 +19,7 @@ #ifndef __BTRFS_BACKREF__ #define __BTRFS_BACKREF__ -#include "ioctl.h" +#include #include "ulist.h" #include "extent_io.h" diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 547b7b0..53ffd31 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -31,10 +31,10 @@ #include #include #include +#include #include "extent_io.h" #include "extent_map.h" #include "async-thread.h" -#include "ioctl.h" struct btrfs_trans_handle; struct btrfs_transaction; diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 841cfe3..2cdf85c 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -30,11 +30,11 @@ #include #include #include +#include #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "btrfs_inode.h" -#include "ioctl.h" #include "print-tree.h" #include "tree-log.h" #include "locking.h" diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ca7ace7..fa98870 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -39,12 +39,12 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "btrfs_inode.h" -#include "ioctl.h" #include "print-tree.h" #include "ordered-data.h" #include "xattr.h" diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index afbf3ac..3f7a080 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -42,12 +42,12 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "btrfs_inode.h" -#include "ioctl.h" #include "print-tree.h" #include "volumes.h" #include "locking.h" diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index a5c8562..a0d6368 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -23,13 +23,13 @@ #include #include #include +#include #include "ctree.h" #include "transaction.h" #include "disk-io.h" #include "locking.h" #include "ulist.h" -#include "ioctl.h" #include "backref.h" /* TODO XXX FIXME diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d8982e9..231177b 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -41,13 +41,13 @@ #include #include #include +#include #include "compat.h" #include "delayed-inode.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "btrfs_inode.h" -#include "ioctl.h" #include "print-tree.h" #include "xattr.h" #include "volumes.h" diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index d3c3939..12bb841 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -21,8 +21,8 @@ #include #include +#include #include "async-thread.h" -#include "ioctl.h" #define BTRFS_STRIPE_LEN (64 * 1024) diff --git a/include/linux/btrfs.h b/include/linux/btrfs.h new file mode 100644 index 0000000..22d7991 --- /dev/null +++ b/include/linux/btrfs.h @@ -0,0 +1,6 @@ +#ifndef _LINUX_BTRFS_H +#define _LINUX_BTRFS_H + +#include + +#endif /* _LINUX_BTRFS_H */ diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 19e765f..896ee12 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -68,6 +68,7 @@ header-y += blkpg.h header-y += blktrace_api.h header-y += bpqether.h header-y += bsg.h +header-y += btrfs.h header-y += can.h header-y += capability.h header-y += capi.h diff --git a/fs/btrfs/ioctl.h b/include/uapi/linux/btrfs.h similarity index 99% rename from fs/btrfs/ioctl.h rename to include/uapi/linux/btrfs.h index dabca9c..cffbb58 100644 --- a/fs/btrfs/ioctl.h +++ b/include/uapi/linux/btrfs.h @@ -16,8 +16,9 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __IOCTL_ -#define __IOCTL_ +#ifndef _UAPI_LINUX_BTRFS_H +#define _UAPI_LINUX_BTRFS_H +#include #include #define BTRFS_IOCTL_MAGIC 0x94 @@ -499,4 +500,4 @@ struct btrfs_ioctl_send_args { #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ struct btrfs_ioctl_dev_replace_args) -#endif +#endif /* _UAPI_LINUX_BTRFS_H */