From patchwork Thu Oct 11 15:04:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10636819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81C9D15E2 for ; Thu, 11 Oct 2018 15:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7094B2B92A for ; Thu, 11 Oct 2018 15:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6527D2B92D; Thu, 11 Oct 2018 15:04:12 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 EC3732B92A for ; Thu, 11 Oct 2018 15:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbeJKWbo (ORCPT ); Thu, 11 Oct 2018 18:31:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:50066 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728120AbeJKWbn (ORCPT ); Thu, 11 Oct 2018 18:31:43 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 43FF9B030 for ; Thu, 11 Oct 2018 15:04:09 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 8/8] btrfs-progs: Directly pass root to change_devices_uuid Date: Thu, 11 Oct 2018 18:04:04 +0300 Message-Id: <1539270244-27076-9-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539270244-27076-1-git-send-email-nborisov@suse.com> References: <1539270244-27076-1-git-send-email-nborisov@suse.com> 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 This function currently takes an fs_info only to reference the chunk root. Just pass the root directly. No functional changes. Signed-off-by: Nikolay Borisov --- btrfstune.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/btrfstune.c b/btrfstune.c index d093d26f288c..81af11e9be60 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -310,9 +310,8 @@ static int change_device_uuid(struct extent_buffer *eb, int slot, return ret; } -static int change_devices_uuid(struct btrfs_fs_info *fs_info, uuid_t new_fsid) +static int change_devices_uuid(struct btrfs_root *root, uuid_t new_fsid) { - struct btrfs_root *root = fs_info->chunk_root; struct btrfs_path path; struct btrfs_key key = {0, 0, 0}; int ret = 0; @@ -439,7 +438,7 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str) /* Then devices */ printf("Change fsid on devices\n"); - ret = change_devices_uuid(fs_info, new_fsid); + ret = change_devices_uuid(fs_info->chunk_root, new_fsid); if (ret < 0) { error("failed to change UUID of devices: %d", ret); goto out;