From patchwork Tue Sep 13 13:39:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 9329135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 208F66077F for ; Tue, 13 Sep 2016 13:38:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13FE529458 for ; Tue, 13 Sep 2016 13:38:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08E3429460; Tue, 13 Sep 2016 13:38:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 075A929458 for ; Tue, 13 Sep 2016 13:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757335AbcIMNi1 (ORCPT ); Tue, 13 Sep 2016 09:38:27 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:24643 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757225AbcIMNiZ (ORCPT ); Tue, 13 Sep 2016 09:38:25 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8DDcJcZ022683 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 13 Sep 2016 13:38:20 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8DDcJ1v022962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 13 Sep 2016 13:38:19 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u8DDcIUe004791; Tue, 13 Sep 2016 13:38:18 GMT Received: from arch2.sg.oracle.com (/10.186.101.70) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 Sep 2016 06:38:18 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, dsterba@suse.cz Subject: [PATCH 1/2] btrfs-progs: make wait_for_commit non static Date: Tue, 13 Sep 2016 21:39:48 +0800 Message-Id: <1473773990-3071-3-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1473773990-3071-1-git-send-email-anand.jain@oracle.com> References: <1473773990-3071-1-git-send-email-anand.jain@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP wait_for_commit() is needed by encrypt patch set so this patch makes it non static. Also as utils.h is included twice deletes one of it. Signed-off-by: Anand Jain --- btrfs-list.c | 10 ++++++++++ cmds-subvolume.c | 11 ----------- utils.h | 1 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 4cc2ed498536..4e67fe28b9b5 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -1913,3 +1913,13 @@ int btrfs_list_get_path_rootid(int fd, u64 *treeid) *treeid = args.treeid; return 0; } + +int wait_for_commit(int fd) +{ + int ret; + + ret = ioctl(fd, BTRFS_IOC_START_SYNC, NULL); + if (ret < 0) + return ret; + return ioctl(fd, BTRFS_IOC_WAIT_SYNC, NULL); +} diff --git a/cmds-subvolume.c b/cmds-subvolume.c index e7ef67d3449b..5df7af56c7f8 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -36,7 +36,6 @@ #include "commands.h" #include "utils.h" #include "btrfs-list.h" -#include "utils.h" static int is_subvolume_cleaned(int fd, u64 subvolid) { @@ -223,16 +222,6 @@ out: return retval; } -static int wait_for_commit(int fd) -{ - int ret; - - ret = ioctl(fd, BTRFS_IOC_START_SYNC, NULL); - if (ret < 0) - return ret; - return ioctl(fd, BTRFS_IOC_WAIT_SYNC, NULL); -} - static const char * const cmd_subvol_delete_usage[] = { "btrfs subvolume delete [options] [...]", "Delete subvolume(s)", diff --git a/utils.h b/utils.h index da23bfcc9166..729e50a113a2 100644 --- a/utils.h +++ b/utils.h @@ -225,6 +225,7 @@ int test_isdir(const char *path); const char *subvol_strip_mountpoint(const char *mnt, const char *full_path); int get_subvol_info(const char *fullpath, struct root_info *get_ri); +int wait_for_commit(int fd); /* * Btrfs minimum size calculation is complicated, it should include at least: