From patchwork Thu Nov 2 08:13:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10038143 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 331CF60291 for ; Thu, 2 Nov 2017 08:14:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24DB828E56 for ; Thu, 2 Nov 2017 08:14:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1998C28E59; Thu, 2 Nov 2017 08:14:13 +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 C9DBD28E56 for ; Thu, 2 Nov 2017 08:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754844AbdKBINt (ORCPT ); Thu, 2 Nov 2017 04:13:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:60194 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbdKBINq (ORCPT ); Thu, 2 Nov 2017 04:13:46 -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 mx2.suse.de (Postfix) with ESMTP id 551B6AAC5; Thu, 2 Nov 2017 08:13:45 +0000 (UTC) From: Nikolay Borisov To: eguan@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, Nikolay Borsiov Subject: [PATCH v3] common: Check for fiemap range argument support Date: Thu, 2 Nov 2017 10:13:41 +0200 Message-Id: <1509610421-16716-1-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20171102031622.GV17339@eguan.usersys.redhat.com> References: <20171102031622.GV17339@eguan.usersys.redhat.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 From: Nikolay Borsiov Signed-off-by: Nikolay Borisov --- v3: * Changed the way we detect ranged args. Now use a regexp which checks explicitly for the ranged args common/rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/rc b/common/rc index e2a8229..f7a5fe9 100644 --- a/common/rc +++ b/common/rc @@ -2053,8 +2053,15 @@ _require_xfs_io_command() -c "$command 4k 8k" $testfile 2>&1` ;; "fiemap") + if echo "$param" | egrep -q "[[:digit:]]+[bskmgtpe]? [[:digit:]]+[bskmgtpe]?$" + then + $XFS_IO_PROG -c "help fiemap" | head -n 1 | grep -q "[offset [len]]" || \ + _notrun "xfs_io $command range param support is missing" + fi + testio=`$XFS_IO_PROG -F -f -c "pwrite 0 20k" -c "fsync" \ -c "fiemap -v $param" $testfile 2>&1` + param_checked=1 ;; "flink" )