From patchwork Thu Aug 24 11:47:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9919877 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 4B14D60353 for ; Thu, 24 Aug 2017 11:48:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 457FE28B8E for ; Thu, 24 Aug 2017 11:48:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A70928BD8; Thu, 24 Aug 2017 11:48:00 +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 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 DBD5628B8E for ; Thu, 24 Aug 2017 11:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbdHXLr6 (ORCPT ); Thu, 24 Aug 2017 07:47:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:35475 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751462AbdHXLr5 (ORCPT ); Thu, 24 Aug 2017 07:47:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7F2E0ABC3; Thu, 24 Aug 2017 11:47:56 +0000 (UTC) From: Nikolay Borisov To: linux-xfs@vger.kernel.org Cc: sandeen@redhat.com, Nikolay Borisov Subject: [PATCH 2/6] fiemap: Make max_extents a global var Date: Thu, 24 Aug 2017 14:47:48 +0300 Message-Id: <1503575272-28263-3-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503575272-28263-1-git-send-email-nborisov@suse.com> References: <1503575272-28263-1-git-send-email-nborisov@suse.com> Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nikolay Borisov --- io/fiemap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/io/fiemap.c b/io/fiemap.c index ed3a8be1dcc4..d284248e4fe1 100644 --- a/io/fiemap.c +++ b/io/fiemap.c @@ -24,6 +24,7 @@ #include "io.h" static cmdinfo_t fiemap_cmd; +static int max_extents = 0; static void fiemap_help(void) @@ -56,7 +57,6 @@ print_verbose( int boff_w, int tot_w, int flg_w, - int max_extents, int *cur_extent, __u64 *last_logical) { @@ -111,7 +111,6 @@ static void print_plain( struct fiemap_extent *extent, int lflag, - int max_extents, int *cur_extent, __u64 *last_logical) { @@ -196,7 +195,6 @@ fiemap_f( char **argv) { struct fiemap *fiemap; - int max_extents = 0; int num_extents = 32; int last = 0; int lflag = 0; @@ -283,11 +281,11 @@ fiemap_f( } print_verbose(extent, foff_w, boff_w, tot_w, - flg_w, max_extents, &cur_extent, + flg_w, &cur_extent, &last_logical); } else - print_plain(extent, lflag, max_extents, - &cur_extent, &last_logical); + print_plain(extent, lflag, &cur_extent, + &last_logical); if (extent->fe_flags & FIEMAP_EXTENT_LAST) { last = 1;