From patchwork Tue May 23 09:00:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Babu R X-Patchwork-Id: 13251936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF04AC7EE26 for ; Tue, 23 May 2023 09:01:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236245AbjEWJBX (ORCPT ); Tue, 23 May 2023 05:01:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236264AbjEWJBU (ORCPT ); Tue, 23 May 2023 05:01:20 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BCC8100 for ; Tue, 23 May 2023 02:01:19 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34N6EAXx032748; Tue, 23 May 2023 09:01:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=/UVOcU7V7ZRcDiy0xGb3XDmv/lxe0NxEU1WtBDKoKD0=; b=MpY30gvsCiUj1ImspXh3T7j2o5P3d9EnDpyi6vfFCKYK/pykVJm+23MX/DFAuqNVe8lG GNMkbWM047Pn2VOS+lzRtT/QXF7ckWM4272zhVRq5uO4LlDaUoQpoH+Jnx6cpjq4rjvz Y30BEsphYluBFU7mYMYxoYz9g6v6iVkuEGe5zsJ8DJcqXi4mpamsDG1CUpuTVKKa9TRk hKWK7JQ+W2lkXIuLyW/8ZHm5DTusX+Pbf3miFdx/exxzP0nByhFvMg2ZUEfPkDslsSgP fG6+1b6iRcAzRPoBiCxfMpbbocu/y2e1jI5UAxVAQW3Kg46GsjGzCX2NlWT4r5aSPfNX zw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qpp44mjhm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 May 2023 09:01:16 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34N8ZZVw029026; Tue, 23 May 2023 09:01:15 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qqk2aj7kv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 May 2023 09:01:15 +0000 Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34N8xwrp007681; Tue, 23 May 2023 09:01:15 GMT Received: from chanbabu-fstest.osdevelopmeniad.oraclevcn.com (chanbabu-fstesting.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.250.50]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3qqk2aj76a-15; Tue, 23 May 2023 09:01:15 +0000 From: Chandan Babu R To: cem@kernel.org Cc: Chandan Babu R , linux-xfs@vger.kernel.org Subject: [PATCH 14/24] xfs_metadump.sh: Add support for passing version option Date: Tue, 23 May 2023 14:30:40 +0530 Message-Id: <20230523090050.373545-15-chandan.babu@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230523090050.373545-1-chandan.babu@oracle.com> References: <20230523090050.373545-1-chandan.babu@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_05,2023-05-22_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 mlxlogscore=860 phishscore=0 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230074 X-Proofpoint-GUID: nAWi5XYX68XNbxX4kwgA8RuZFaFYq7Eh X-Proofpoint-ORIG-GUID: nAWi5XYX68XNbxX4kwgA8RuZFaFYq7Eh Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The new option allows the user to explicitly specify which version of metadump to use. However, we will default to using the v1 format. --- db/xfs_metadump.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/xfs_metadump.sh b/db/xfs_metadump.sh index 9852a5bc2..9e8f86e53 100755 --- a/db/xfs_metadump.sh +++ b/db/xfs_metadump.sh @@ -8,7 +8,7 @@ OPTS=" " DBOPTS=" " USAGE="Usage: xfs_metadump [-aefFogwV] [-m max_extents] [-l logdev] source target" -while getopts "aefgl:m:owFV" c +while getopts "aefgl:m:owFv:V" c do case $c in a) OPTS=$OPTS"-a ";; @@ -20,6 +20,7 @@ do f) DBOPTS=$DBOPTS" -f";; l) DBOPTS=$DBOPTS" -l "$OPTARG" ";; F) DBOPTS=$DBOPTS" -F";; + v) OPTS=$OPTS"-v "$OPTARG" ";; V) xfs_db -p xfs_metadump -V status=$? exit $status