From patchwork Wed Jun 7 09:59:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270326 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 1C67FC7EE23 for ; Wed, 7 Jun 2023 09:59:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234969AbjFGJ7w (ORCPT ); Wed, 7 Jun 2023 05:59:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239332AbjFGJ7t (ORCPT ); Wed, 7 Jun 2023 05:59:49 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC30199D for ; Wed, 7 Jun 2023 02:59:48 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576JrnK011468 for ; Wed, 7 Jun 2023 09:59:47 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=F45kMKDT9qLokCtRvEO8B2rprbWhXa7H+y3DJalIv2Y=; b=ik+0HGDDlmI4zajvr4VOhXyBBPiKJFnTe9wlkqEPUH0og2LJNyYfr5bZWhHWEfSl2MTO TEwwCuk3YJyQYwccvMpYqkFVDR1owRtv80mcHsxPR0lYWhVJk7GkwcXTWW1kII2Foy8E VM5pYi4I//GyBy1fpfaBZyQUAaoyWyvN4OfwxkppuLE827ddwLTfBrQWULuA8UdYJWgs oYHZyj8/TgoXXjhNlvblGZiwIcN68pWbGHkg+5jZMP/QaQ2MbkxSwMOIC2DH///5x1AG h7MbPIzYNbq7lTJ49PIx+V7fuCuBwGeOodTcDVhjlvmV3Wmfa7zHp/WWRnPN5mkSZ2lL rA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6uscu7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 09:59:47 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579QHDu035860 for ; Wed, 7 Jun 2023 09:59:46 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6r9fx8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 09:59:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jRYqxsx1otp7MIfm7pZi8OuCDt0Uj+8jrJ0/B5W3/fyrcQ519nWFjeHZJSvam9gKqcqAzmcUc48dnLQtsEkHwKnQZxMK1HNn6ns8Tv7vbIObt9ofEPipiN0lEtkzbAwjT1VYV+aDflZK2Uai/i1flzME9U3nIghb2BE9V96ZS66Se37GeHo7MrX3sqb2cvCW7svLRD6ffM833pqlOOTTL5/CeRJW70lPQeN711UkVTquOEnnQJMpQ/ZMZ0WC/I4O3UKtgAls6jBoRLPZWTIpva4erz9gua4h9q9IsYPM35SEAdEb+9PmVrL/iTQsHaUI76KFTIWuziltrORZlRNBHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F45kMKDT9qLokCtRvEO8B2rprbWhXa7H+y3DJalIv2Y=; b=P2CMut7MueqkL9qVH7O5rKjD2o30iWP22JFOJIwnicj6HqMDVi7Ix4LfGNnWSXQNXp+7UH0JZK+X7e5C+E3DPq0fbTSFiDZAwNsEHCadQhPpOKiuAS4pG3SjtJWoKLBqrHPRj5MeMUCSeW6cYOpzTDgqGSdwHTV1SjCkjCy1tqLGrE21wX7QlxDLw08nZhNs2cZs1KevoKFMSmFD3hCfeCPwsyFNOGDdZYEZzyn/m6hjtT78tNJ0PmGfQnpviMcwKJXPfL3CEmkY5Z0fqrF5OYUyF4XO/CnbrhdTMIjoViJxbdEB2542br6jWlCXYRCEm/bI/Alep31ShhLeiVC2ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F45kMKDT9qLokCtRvEO8B2rprbWhXa7H+y3DJalIv2Y=; b=SpAOlN6bc6aPhWitlCg4ZRZQTGVaHiiqB/F4YjkGf3l7uYMSk5zyuRGVcz2Iv0ztl6HsOY7PLXWaJ3uCg4K1f5OuKEcCM+a1Tuujd+vGK4qf4AyFckWazcafi9kWsYo2n6Eqiz5Llwz+FkO2zp5Il2Wxj3xWyH0EcwqAoS+CsZk= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 09:59:44 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 09:59:44 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 01/11] btrfs-progs: check_mounted_where declare is_btrfs as bool Date: Wed, 7 Jun 2023 17:59:06 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SG2PR04CA0196.apcprd04.prod.outlook.com (2603:1096:4:14::34) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: d154d41b-1817-4362-b42c-08db673deb87 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cJrsQUa+68+JDNWiLnaF+VRTVdpbQ68TRQVWjSWuqj1ST+F7HCkqUJ7tcdops8UH3mIDvHy7bbJ71yMUtHPu3httc0JzimXCdNT0B/8cbZuu+ATOG3wFVaAxmXO1unItjLW9gebb2FkUjq6sMBiJSICoG8JYYlPr7Ze1WOjgUWqkPGxJQDcAam1tkFnYFXlHxcd6HiTVXbpDHdTj525I8O2xdK3wbdmT2F01qTfJK+Z8J3NQLZrK78ks38kJ9XX3nY9yJDvOZTaSaZexVC5cyq7q6QgDOVsyXapoxLGpffbAKYx58b2UYou+vXr8JDhaJ/LbTf00JMFMwFNKSL1k7NcWekkkQQZrvsg9qP14BC3ZkMRzNpZDHByOmpIrsVmMqIOsCFse3bu5+torzILcetr37Ej9PDg6WCqSuIGleeQyqyG2KMiA7grKWFaiRUCFwvuM5ZIsEz2BJi8iUfopgbJ1nLHzJr+QSxJRTmJn0UePW0rtHJ+PP+j63OeYxOrHlfNDwICUtkPSXQyMZLMi5umT00FHstKbJAxtY9nYkmgrE3NqIY6kKj7J5fwM9wui X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(4744005)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KiAzlMe19ZaxDPmRJ0KaGxMN3xm1RJ9L5Yn9pAja96OahmXHvP7xLNcrNrar2F/GpVcvKjKOmnzWNpwzG6ZNudatqf1ErDRoW0bkT8hawc6a/3DAiAbrQjK/XSyhbRbwj/5rt9T6cur7e9EA1g6bkRGDNU8ErMngTlQjc9vL78YFuEodflBFls+GUT+MOzeOyVp2aSBfN+d35rCiN89mPMzJE28Vpp7mvAByAIIf94w/Eo3NKJDyqawHJgXqn/AwYi8QwzQaGcc3c8nM3M7FY/CdgFrV7AyjTac1rWLvfBA6CuCb+kTBLTaYet1AQqAOmqEkV1RKdT9BojFlDE/uToatRhDcLlP1nZaqLCnWwD5G4dqeNwXD1eVlVxW+RGW/kYp4KwolT/drD4TGMHebbsNp9FiVB20pzUwU22Uqn/kGWMCPsqvS/y/KW6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D3f27rZ9gdRVO6h9O/KmBWfzhMniy8ljjXBjD1XALBud+ee/CuA3f+b3Cs5EjpZ9uxvpBRiCRB8Lkg1jTMGJFbLEF+A== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: DcuOADeW4QF4p4kp23hTH7EJ0t1nWXZlozS9wW0LG7FxX/v3zmkYNAUQgEZf5QKb0NQCUpA2Mu8Y1f3soc4Z76Z+qh7wuLfgbwejCuPJG79IJBU1/LhN4WcrIRDQEXv/SAEJGZF5wrp4lBDsglqWTqlkerIrExwkn0n4oC6WewUWumGjLekerQMAzU2myUlUrUuX+uN7oah4P6TWgUWi3kEsSCFOlbbfc4G2FhD9msJo+xPWUaf1shklUfgamk3JrBcvkzeIV2sIGLosnYRHlBpOgJ0Lj8G2JYJqmzec9Jx5hZvju6mBv3qHE86zzqDQGwvyW6z+tjwKqeba+FnAdSxagjP0j8yHsgZOQrndtfqQaN20FvBJwgIr/sBqxNgySRjKDKVV7P/hrW1mJXk9b63MpkdygSjwER9Pb/QFaOeXakx8knHmTZTlvPiQ3coz3DsNBFG6H4iZx76xYAu7TBYQyXyQ2+UNCchb2393o+2BoIWU3v+4a/qDbbYhb9d0ueqZDo9G+U9cy5azX9Wp3czUcylfnOwtGaEyVIGkwHw+j97RCUXYVEeo4w/VeNficznSy7HOHjc6f/dL4IIxqT4NHIR2p6WckcIdKv6jczdVzsaZ0Qau6/+sesZ/lOq+5lXbl1ATjLH85vyMc4mm1+vQXSYRIAGwa3stoG5QVP0ymPEssf54IxQs1tUcahw4c8QqDGDexUpXfcoCQaCatDUfc4PhyjEfxfGN2B6tS9F1MJX242gKE2tuQ0ep18X8 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d154d41b-1817-4362-b42c-08db673deb87 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 09:59:44.6015 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pHQ8/ENkUooc5ERONnJs5IsbgMb/H0HZPsabJL8mx7ytnbspR2n06cdAdLFPCDKngSL8xJgoUvvvRbmJ/bJi/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: DaciZ5dBkBBRTEOgP_oLBnRDfB5PnoxK X-Proofpoint-ORIG-GUID: DaciZ5dBkBBRTEOgP_oLBnRDfB5PnoxK Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Anand Jain --- common/open-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/open-utils.c b/common/open-utils.c index d4fdb2b01c7f..01d747d8ac43 100644 --- a/common/open-utils.c +++ b/common/open-utils.c @@ -57,7 +57,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size, { int ret; u64 total_devs = 1; - int is_btrfs; + bool is_btrfs; struct btrfs_fs_devices *fs_devices_mnt = NULL; FILE *f; struct mntent *mnt; From patchwork Wed Jun 7 09:59:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270327 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 E8139C7EE23 for ; Wed, 7 Jun 2023 09:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239332AbjFGJ76 (ORCPT ); Wed, 7 Jun 2023 05:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235396AbjFGJ75 (ORCPT ); Wed, 7 Jun 2023 05:59:57 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1C41735 for ; Wed, 7 Jun 2023 02:59:55 -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 3576JoFO017995 for ; Wed, 7 Jun 2023 09:59:55 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=WFyx/0EHsESftCnzqqieQxeqFoLQOA8Ww0Ikjz2AQfQ=; b=hl2MNATNddzkVgbe3jZ9Jw3f5jn6OE2v9MMF+DCh1d8RfSm0l38tfMnBCSf+U9sim+t/ 9Hy6fXecvjFgfchYa3DnRro5KTzlcymrYSX33hQJHGt3xqOS+5MRxuao7yPN1zQrlFcj kfvCn9v88zEVq0V6OIG8QPWURkR9+sYr3qqu+LlnsTVP3fW7aMnHwbepxRg+ID2Y+IkO WA6KZbUXLNSwwIPebwGQG+RQm89ZGnxVRS74CAVSHgTnWe4LU+4a0hlvuAWgATqXnT4B WZ4wDGjS/4uqbhXT3H6EHm/l8Vk60mEhA/VCFlCwDGT13hatuhKT3U/bLObMccVCKb86 Iw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6u9c92-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 09:59:54 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579amGe015682 for ; Wed, 7 Jun 2023 09:59:54 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6kh6k4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 09:59:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AiQFZAdi68oclQKJLtXWvgi5db8pX9Ce+LYOAl0CAgt2g8cxknjNEqseR9cMBVz5MwJQW6VXPkUzUsa1ztt1lEWvs/5RbwplAc6HP4AiS3ceQkd17ClsCl35/NH5wDzEe/4g76c1eCnGRc03cGGKeCEWubBYddpuPp7QkLto6Bnzk/Wv1kwhOadOBPh/w9DaL2TcPZNJsuye1Ra+ljne8R3Ku5t3nvzN84C52BEtSKztvB8cgPUJIiTu3/6O0nQ8egMwF+kFYFSe9uWMj7xE7IqdhaYIhnBkA1NROQUDS6InpI4Si6r4oNO4LCJxYyC5w5AUzdfGSMMiKR22o0/0vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WFyx/0EHsESftCnzqqieQxeqFoLQOA8Ww0Ikjz2AQfQ=; b=EXEzQ+cpLBZ7ssHOX0ngoGRWY9LWBtnkZ5D8aC4l/S39MAwfkm/vzBgSP5pwKY/umSuZeNfgRIlzL2z0+phlH3gx5FayCaGlIkrvYQeXlUs91wShkzfrkiWZbwQ9udMsm2vqV22H7xxjzDwWLVN6oLwJz1s+M6uP4rCsSj2NIO+ifUYpZqUWJwTKXymOpX/nduEW21h4N1Oqe+2g7itRyJadyIptiYce0aN5uGedBz4dRssZGr8yjSvAfnwxyEpZdJaPeyopdtRdtO/IWItZl4CYwYPA+ubvQ2wQ7k+iTnQDcTwYkgxkC9mWZACI8qgvsjko8O7D0qsiHNjBNoFvBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WFyx/0EHsESftCnzqqieQxeqFoLQOA8Ww0Ikjz2AQfQ=; b=vGqg8h01GgRSB3mwTFnofqPGTeCYxct9B6FpE2qGCYPkrhUOb79gzaFyQFQDpzUmqPNHSLUaIanJU3KZ7HAlUmpJcN2H4SPoF8e6jV/s7/BBykd3GXk0xS2o1HrWb9op3G0dkZ1M9Ryt6HLesLXPXtgvNVelsPAr9zTFnqmLLOw= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 09:59:52 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 09:59:52 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 02/11] btrfs-progs: check_mounted_where pack varibles type by size Date: Wed, 7 Jun 2023 17:59:07 +0800 Message-Id: <647a6dac9e1388b45b6f219927488cf47452b3e2.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR02CA0044.apcprd02.prod.outlook.com (2603:1096:4:196::17) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 5055471d-67a7-44a3-8446-08db673defde X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nHUYujPPYaGVwnZa9OFKjk1vgR3aMPR/uVPf+rUJ6U7nBE6eDCESDRw4+uDvAjy7iaNqLRRYupV4+KRsUxdW3JUVByQ2rYmPaXI9tz09eZZw7kyaws9kKLMJDB+S+crkYgTtpRB3NPG8XBSQ8o0YSOjdGnIJXAo2ODANUZBektJVxjS7BgZZNjgqLahJN4uGn9D26djQPKI/Mame1dPBOA/cdIKN6vis7FG1nTfkCBvIG/JWVOcVJF8Q9PA3ZJbmYZzXR6f8gCIdRzTQtqExEDzCNEiA8+Oxcpj7+vtw7x3DpS6Rg+dSAcx5Ub2Dgc0+SXu9LBV/BEzPQvYa72ngDzxy6rUim06EcQyiB4EofvQ0j+QIiT5PdmKhHSxF++58sProgyWC3SbL+n37quxh94mpzQlCAxu51ZAzJIy1XDDOIi523+ctlFjnN9bmaN6rH0V33auy6EMUKMtYZYa3ECTqRuBEKEl6myjjlsbVIZZab9nIZg7rETeZKf+gtsf6f1IfLr764O/d+R/h48ZPTltYZvpVxk/UNgzOoeFxXv5/7nlSTtwwEcPKqVJxz41P X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(4744005)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: o+zbF0LQyInfS7urn1KMtT/eMmH7y9T8RAx0jKWbarz3kmX9XePKXnH/ODfqWx4fpgQknnjpScuiR6hBepuyT83Ok0Qi+S1iZryLl+/creJnc10HjvxnPD75nIkVlrZLLp+O3j/TtSUfYwPONRcLKPSM0XmK+G6ZANEw4GDwtAB6WSSbWOm3Ub4ApiBpwR6BvlvojeHXoSS1lLm56K8LnbkMoMVWgdEuCady1AD4YMIKiGSFplxOmvjNjC54h8vqjYQHszsCdB9AVADrLBv+wMTNCiSVby3FWce1+/vRiX4Wfh2i01w1uXcqU4ROnoqa/VMSqDq46Qx/urHGI67NP631VtaDK/XZc/wATkxasROtzqcu01eGcquDpLBv5ra2koTB0Tp7ly2q9RjNRkmNWW+9iNEDIbgWGbaqK0Uwss33BxSgCq3GTm3lv5ulfBfaKgxHJaEPtvFTEPK0CfmSbiu1v7VYhzJ4lnnOgbWZ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pI1fKoFNUuPA4cTRnbMlyhatn3OMTj6MJDkAV0hE3ROqldOimRdh7Vycv5fg1MV82Tw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: d9sHfhSqsH5jWx500vUXCoZajN1xIbsSOpGAHea+j+CbX76+Du9OfCUAiGCF2dKmFY0qCpSBg6apO700XrpD/3ovCc24p+X8eifIGL1m8vL3Cv7YyI0y0zdhDZSRcWnYhftl8waMUXRk+C1PvFlFvXpBBgav3x+XsWqMGZl8bCqUxZPM1n/oUFksuxP9XAMQTmZ60hbO9gitCiSwH8nGYnfrogDEsg6xEE4ZgU7gREi2NZmfnfFIJaEI4t1oIilFLNcLKKefauiuiRWrJJiq4LmlNBpYV+hAFdC6YLOF4yJyz3BJmYdJEAJDZkeAi8pP+UTz8oHuo374EqYGvrCORzueT9f7ncdZB4bA/QldY4l8bpb9GlUkIngpwiqZJOMtlvuVPvFEN2fU6UuCZh7fROg9oskfdKatqjzym/7+0xYoNuKh5WlJmTCOzp4e+Ts3xm7PxEmtxP6FJuwD8ZdHjFMJYaH8cBIkZ//07rfMZbpI7Noz2jmaIhkZ3rwzPRDPcMj8JFXHZVn8ODGLIDh9wTbZO3ejc13vDk9LOldaDHeDyz/KfKP6UjthfP4zq4kSeLfAcg3oNHjHH5XV8BJManEvWa1Cy5mxo93VC6eMX+j9wyZlBzRRubrb34+aS2ixX8rPpN1JlKqDuDJEhyzdBN6oad6UKhjSqqz92mV5ab7Qu+XWMbWyAf5nmDpg1tSRdaFIyXKLlZrr83xJ+NkSBL979Dd4AIIaKoUgZRp6ESd7517CG0Dfe/99BJb4n7sO X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5055471d-67a7-44a3-8446-08db673defde X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 09:59:52.0721 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RwE24VMnCx4XtVDAaKSiSuNA77u6+G8RGuLobWVVyggeT6BVA6TkXRJNu/9ZVmJmKP/rVO5FUJNxv4fn8Bw5Kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: 3Lpp5grI2Osj8ld3LZPH52g0IblWxM0s X-Proofpoint-ORIG-GUID: 3Lpp5grI2Osj8ld3LZPH52g0IblWxM0s Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Anand Jain --- common/open-utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/open-utils.c b/common/open-utils.c index 01d747d8ac43..1e18fa905b51 100644 --- a/common/open-utils.c +++ b/common/open-utils.c @@ -55,16 +55,16 @@ static int blk_file_in_dev_list(struct btrfs_fs_devices* fs_devices, int check_mounted_where(int fd, const char *file, char *where, int size, struct btrfs_fs_devices **fs_dev_ret, unsigned sbflags) { - int ret; - u64 total_devs = 1; - bool is_btrfs; struct btrfs_fs_devices *fs_devices_mnt = NULL; - FILE *f; struct mntent *mnt; + u64 total_devs = 1; + FILE *f; + int ret; + bool is_btrfs; /* scan the initial device */ - ret = btrfs_scan_one_device(fd, file, &fs_devices_mnt, - &total_devs, BTRFS_SUPER_INFO_OFFSET, sbflags); + ret = btrfs_scan_one_device(fd, file, &fs_devices_mnt, &total_devs, + BTRFS_SUPER_INFO_OFFSET, sbflags); is_btrfs = (ret >= 0); /* scan other devices */ From patchwork Wed Jun 7 09:59:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270328 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 367BDC7EE23 for ; Wed, 7 Jun 2023 10:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235522AbjFGKAG (ORCPT ); Wed, 7 Jun 2023 06:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbjFGKAE (ORCPT ); Wed, 7 Jun 2023 06:00:04 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FA321984 for ; Wed, 7 Jun 2023 03:00:03 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576Jv2W011754 for ; Wed, 7 Jun 2023 10:00:03 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=k1bzmiZlM53OVvVyZDl1b+6vfwEcglyjqs/zesI3PFw=; b=3hp7nOhVc5kzr4rDQ6q0CnGg5+Fsqdhb42uPkPOPk/15cKNzYycHKWs5kNS45PL+o2PF 6TNzdo2p6gRy2E56V7BWBpHtcVJrZOF++7KMsgly9IdaefSlsGH8Ueg7jkWqm0y6gjzB 5fnS9dwEHGdyotmRBy8Tx54CXHeUCu2j/XCFdfwafcw/vYlR+ug44y8B+dJgPQgiU3D7 BOMHqrqbDpcASgg3VEYXC91DKbyJiY/nQ7TW1pLr8elq/Oehm0eZRfqSYWZS+YueO/iG l7ouVrRFefu5p0XEe/n3qEFJF5NfWEhRsvkFVMF9Ipgm7Uq34E7Edms+vx/uM9YzUw4M Lw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6uscum-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:02 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579YauO003124 for ; Wed, 7 Jun 2023 10:00:00 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6k1d03-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I4lcxCDbfJPRkM1Yan6Sa/i26gYBSiin7uLzvIIpBWE+aCJmPcmNC/lvBpvkvIZVaGfO0gvp8B1OIyEPG/9ziQTF9motl3+nVX6ClKcG0q2MFc4dVHjN2S38AVle8sJTUIOM8DsO4Ce6XxEUY+04IBtg+gX1HrWzW3nUfBm+eOkt2l9MO3RCGt/ZHdpGSCZKhZwYwoLfZrxn5PoblcEdSZ+Z6YVDHZuSkTBJqTS0Rb5+yPLidHLI9FH9movBAixSni0IQ6pJLdX3KWyGwrDDc1Gt3sxvJG4wlGJ3lLAiAHT2Z4/uuBaWFXd+T/ARI6tDx98aU3OYNSUYrqPnnmsx7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k1bzmiZlM53OVvVyZDl1b+6vfwEcglyjqs/zesI3PFw=; b=gUfCa2CPtmxIhUA/IFnglIsajgfDDZCiwWO5ARtDdwtfKympCQK9hM5ASTmYw0Pjs2ekJK73aqwebbka1/U0E2c/5zKq64QfGa33EoBCpLe9L4EFqzYF2RW8DI0CbP/MnxEaxYyFbZH5ud5tZepl4WpeZGTWyHOa+vQp1jC7WaQ044B0xpV7/6Q/ka48xSlijXg3ETNvgBw+72cpEoPXwD5s1NaHcWZB993UCvH3aHp6Xrg/4o63cv2/cwR5Rp5D6GCwTpf1/Zdj/zsh2K5pUIBn32Lu7ZJLBTSKnjG2MF7IKCd0eFaoUj3aLRYkpxEqEE5cB0yczKMJFdrQJeU0uQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k1bzmiZlM53OVvVyZDl1b+6vfwEcglyjqs/zesI3PFw=; b=AohBTM92IKGjfCh0WPzlJrFgFuo+I7WdM7ZgEoq73jxUCiixU01FQi5u8+yxRwKI/szw2RDOO182yjRZCrkgL6KsttC01RXiG9zpwJkeCYy7zuIAHjN3nuRz4846faJnMt0pLZ19ft/ZQzQTrCy+tqcQpVAYLh4c3l8HfQ1/DJE= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 09:59:59 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 09:59:59 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 03/11] btrfs-progs: rename struct open_ctree_flags to open_ctree_args Date: Wed, 7 Jun 2023 17:59:08 +0800 Message-Id: <50ea8bac7ced576d011afae890612ab2c8eeee32.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SG2PR01CA0187.apcprd01.prod.exchangelabs.com (2603:1096:4:189::12) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 1432395a-9dae-4eaa-bc42-08db673df3f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xbzUfgfr00K49cM/DReHslNtWWTu48RJEHCmz0B8n7ldVT3OssxuVBC9HC6rHs4WCJAvHiyu2f8J2+nzUrR4gNeJYKTqYeDZkSrfoJnGBFU/D10ih+bSox8B5jf6h9iNl+2mC0a4YvCT0NM34y8wC2iUUH2Ntau1a6cN4Sf/oc4HxzJ7I+OKLP/mSyqwOn+wxl01NPjsKSoMzLBs4eW0oOvMwZJttto1gRu0oztS4ISSPFgQCPTlfYrwbxpp1YcsWVPNiQTFjdfjcDwlx9ZnZN+ldFi7oZLJD1/V61V97OPsJ0TrGGRzHZWKSHVkQLyQTxemYYJ4mzixSPqUXLGGWze2sHOnsjkesUeOqwzfWvZVcu6YHfb+HKoeUZBaO1SAm+s2IKADT1PG2nyUy4RmmQnj9mwTruTlkJaJ+Wtvf4D92csqDHuQKwaSEQ4HQJuwQkWG2vq+xaWAs7XPhr59b8z7rswhmPsKl7ZKWTeNAicUm4bQQpN15aXD0xHoLnKV+zU9xeNgUeGSWpwSdfHoSmqzq5sVVwNR7MbOkD7rKYKCfBKidJ7OtjgnJIG+c6YB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FIkUhL2lmy8Gv+BpE5WfkjGXK5+N5ofSP55j+6F00p0Z8cwnsh7u9H0/fspJml2KOGzgoy8OoxxxVUyx5qeVw7VcK6nvXo91OnUS/PGvRGsYlskQ0k5XIr0Q31E+aKvC1m8t7mhFmxJmDL5mnavTVLmFYcZVnql/qwNUdbxaMgQED6XU711NdOWdD1oqTeBHcq8deohD9rPO1ECng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MGjYB0QNcv38zTJNd8msumNK6zmmq9wKp6+ThQGpEeevtj+7awq6Brma3VDkQE6WsedhZ87QKmwOUZyUSdREjKx+dW9cHTa+Z6554tcDnc1yc6N8oBk6BJci/M+UZnykZEZdoS/l6xiZvvzsY2eyVpmlqvf7fau6uNVEJExXYccgsP0G86ESwBosbtsU65tPb5rnIGXxIsn850PmfBtnjkJQ0KyNkYumex8xNXE9WF7exO0vzfuWfPKb2TgkjJiVzrrlWWe/hkVLX3zmXi/ec3lI86QkPDaddq4ixc4muHqWtCtcFZS6vtdICalWEiF1a3UEWnBYhkBdrtArYSZDYQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: JTGPsTCgFljn/yLwIn2NqLZFgeR6Ubvt2P8EQysG+H7qRtW+FO5vk0JIvi23qJPLcSkIhRaPrpIRjDMys8DE8TkywK/nxYmpMtB1mjUbeiW7g4tyuEEVf+7llQ1MdFPt8RnkhG0VKTFYaJM963hL1kBMMk/r+5A6ZwuE22bXfWf2kMulo6gduLQCP7ObWpeVO6doamHyknSx+SidF9og+HGNxhDr2gq0auBQ+rxKCpqD7jovk+jbhBkSIv4z+zDu1ItJ6LlBbB8wDUBdQowjaOVaGdq1df0f6cYY/W9WQUrK1ZVz/oHc0ykhrLu5hgoASKFeRSGSJvBUQHDXW3WMP0+5ONpo/OSkjL2/O4MtF2na1qFMEyX27WWgUHazw7bwO0LFmwYv7epWGq/VpllKANCB7uceanMYe4OCiJfxXBbiPpM3n7VLwQmzBMRHvxla56kK/LodUNsGzDW4vUby5hCBRJ6cLNdX3ocCigiV3CIqY42l6VrHH0Y7SV1LPnybf1mpB0pzSyMwsCyxCpZUVv08Ao8z5E+yd0PIKKYLOJgQuCxZjUpGqNvoIn9RD25Fizki9LNnH3xLTVlwqhGm02x9sQrB66irDqdxMlJYNcdm+wCK+DBDeZECFbugb8r/kh7tj6e5gpNropHUl4Oz/mtvQ8zjJLRDHwb2xZdVCgvTtCT5O2wba5Uppg3LvQUcyoEKHMBodv0lXHQ6yYBBzLXxa+Mfbw9lRaFdtSeZkOOfTQlA6TMSC1RAyK6qxbKoXcPRzm4rpeqHtm6IizO1sw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1432395a-9dae-4eaa-bc42-08db673df3f9 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 09:59:58.9708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5KxtVXRoyECHxeCJ+DlDGjukJS3YimICllWBzkJMJRcZBv+e6AiaIaAGrt/JxtHxJ/h/X+ap7R3v24o+vX6YTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: 1VElhJoGCBwlmC2eaImJjJyIGJ8cs-yR X-Proofpoint-ORIG-GUID: 1VElhJoGCBwlmC2eaImJjJyIGJ8cs-yR Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The struct open_ctree_flags currently holds arguments for open_ctree_fs_info(), it can be confusing when mixed with a local variable named open_ctree_flags as below. cmds/inspect-dump-tree.c: cmd_inspect_dump_tree() :: struct open_ctree_flags ocf = { 0 }; :: unsigned open_ctree_flags; So rename struct open_ctree_flags to struct open_ctree_args. Signed-off-by: Anand Jain --- btrfs-find-root.c | 2 +- check/main.c | 2 +- cmds/filesystem.c | 2 +- cmds/inspect-dump-tree.c | 2 +- cmds/rescue.c | 4 ++-- cmds/restore.c | 2 +- image/main.c | 4 ++-- kernel-shared/disk-io.c | 8 ++++---- kernel-shared/disk-io.h | 4 ++-- mkfs/main.c | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 398d7f216ee7..52041d82c182 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -335,7 +335,7 @@ int main(int argc, char **argv) struct btrfs_find_root_filter filter = {0}; struct cache_tree result; struct cache_extent *found; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; int ret; /* Default to search root tree */ diff --git a/check/main.c b/check/main.c index 7542b49f44f5..f7a2d446370a 100644 --- a/check/main.c +++ b/check/main.c @@ -9983,7 +9983,7 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv) { struct cache_tree root_cache; struct btrfs_root *root; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; u64 bytenr = 0; u64 subvolid = 0; u64 tree_root_bytenr = 0; diff --git a/cmds/filesystem.c b/cmds/filesystem.c index 47fd2377f5f4..c9e641b2fa9a 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -636,7 +636,7 @@ static int map_seed_devices(struct list_head *all_uuids) fs_uuids = btrfs_scanned_uuids(); list_for_each_entry(cur_fs, all_uuids, list) { - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; device = list_first_entry(&cur_fs->devices, struct btrfs_device, dev_list); diff --git a/cmds/inspect-dump-tree.c b/cmds/inspect-dump-tree.c index bfc0fff148dd..35920d14b7e9 100644 --- a/cmds/inspect-dump-tree.c +++ b/cmds/inspect-dump-tree.c @@ -317,7 +317,7 @@ static int cmd_inspect_dump_tree(const struct cmd_struct *cmd, struct btrfs_disk_key disk_key; struct btrfs_key found_key; struct cache_tree block_root; /* for multiple --block parameters */ - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; char uuidbuf[BTRFS_UUID_UNPARSED_SIZE]; int ret = 0; int slot; diff --git a/cmds/rescue.c b/cmds/rescue.c index 5551374d4b75..aee5446e66d0 100644 --- a/cmds/rescue.c +++ b/cmds/rescue.c @@ -233,7 +233,7 @@ static int cmd_rescue_fix_device_size(const struct cmd_struct *cmd, int argc, char **argv) { struct btrfs_fs_info *fs_info; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; char *devname; int ret; @@ -368,7 +368,7 @@ static int cmd_rescue_clear_uuid_tree(const struct cmd_struct *cmd, int argc, char **argv) { struct btrfs_fs_info *fs_info; - struct open_ctree_flags ocf = {}; + struct open_ctree_args ocf = {}; char *devname; int ret; diff --git a/cmds/restore.c b/cmds/restore.c index 9fe7b4d2d07d..aa78d0799c4a 100644 --- a/cmds/restore.c +++ b/cmds/restore.c @@ -1216,7 +1216,7 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location, { struct btrfs_fs_info *fs_info = NULL; struct btrfs_root *root = NULL; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; u64 bytenr; int i; diff --git a/image/main.c b/image/main.c index 50c3f2ca7db5..9e460e7076e7 100644 --- a/image/main.c +++ b/image/main.c @@ -2795,7 +2795,7 @@ static int restore_metadump(const char *input, FILE *out, int old_restore, /* NOTE: open with write mode */ if (fixup_offset) { - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; ocf.filename = target; ocf.flags = OPEN_CTREE_WRITES | OPEN_CTREE_RESTORE | @@ -3223,7 +3223,7 @@ int BOX_MAIN(image)(int argc, char *argv[]) /* extended support for multiple devices */ if (!create && multi_devices) { - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; struct btrfs_fs_info *info; u64 total_devs; int i; diff --git a/kernel-shared/disk-io.c b/kernel-shared/disk-io.c index 442d3af8bc01..3b709b2c0f7f 100644 --- a/kernel-shared/disk-io.c +++ b/kernel-shared/disk-io.c @@ -1437,7 +1437,7 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info, return 0; } -static struct btrfs_fs_info *__open_ctree_fd(int fp, struct open_ctree_flags *ocf) +static struct btrfs_fs_info *__open_ctree_fd(int fp, struct open_ctree_args *ocf) { struct btrfs_fs_info *fs_info; struct btrfs_super_block *disk_super; @@ -1608,7 +1608,7 @@ out: return NULL; } -struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_flags *ocf) +struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_args *ocf) { int fp; int ret; @@ -1646,7 +1646,7 @@ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, unsigned flags) { struct btrfs_fs_info *info; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; /* This flags may not return fs_info with any valid root */ BUG_ON(flags & OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR); @@ -1665,7 +1665,7 @@ struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, unsigned flags) { struct btrfs_fs_info *info; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; /* This flags may not return fs_info with any valid root */ if (flags & OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR) { diff --git a/kernel-shared/disk-io.h b/kernel-shared/disk-io.h index 3a31667967cc..93572c4297ad 100644 --- a/kernel-shared/disk-io.h +++ b/kernel-shared/disk-io.h @@ -175,7 +175,7 @@ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, unsigned flags); struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, unsigned flags); -struct open_ctree_flags { +struct open_ctree_args { const char *filename; u64 sb_bytenr; u64 root_tree_bytenr; @@ -183,7 +183,7 @@ struct open_ctree_flags { unsigned flags; }; -struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_flags *ocf); +struct btrfs_fs_info *open_ctree_fs_info(struct open_ctree_args *ctree_args); int close_ctree_fs_info(struct btrfs_fs_info *fs_info); static inline int close_ctree(struct btrfs_root *root) { diff --git a/mkfs/main.c b/mkfs/main.c index a31b32c644c9..23db58b7186d 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -990,7 +990,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv) struct btrfs_root *root; struct btrfs_fs_info *fs_info; struct btrfs_trans_handle *trans; - struct open_ctree_flags ocf = { 0 }; + struct open_ctree_args ocf = { 0 }; int ret = 0; int close_ret; int i; From patchwork Wed Jun 7 09:59:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270329 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 44F6CC7EE23 for ; Wed, 7 Jun 2023 10:00:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239742AbjFGKAM (ORCPT ); Wed, 7 Jun 2023 06:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbjFGKAL (ORCPT ); Wed, 7 Jun 2023 06:00:11 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E41C1735 for ; Wed, 7 Jun 2023 03:00:10 -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 3576Jtkg018042 for ; Wed, 7 Jun 2023 10:00:09 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=0LduO1exDaYAIvA8U8ZvPKe4jKKCbLPtgyUMcknqzDw=; b=MAZXuPwMeqqONNNx9tPQWHOksixlf9geB737TIXpjUsJen2CJUEAqjGQXQaFd2nWcwCR FMz0Fny7Yw8vnaGIF/s+waGfU4uQTxXsqBwHA3Y68bRY3GpRdC016E1lYf+mNJiKfcCh 1H5EOSQc6EKrTyFTNy5E/cca/GVzK/LIdV+2TNIxD6LYJEIpqEsKi7HwEhnxA7qLAJuS /FMFVTXtc1VDsEudZVwYjUh106m6YYIXOJTEGrhRfGhSK0o8gqgWe9jflnP6y3S+TpEe jHwAUIRE65urSHrQFqH8YMNSwNUAC7NiIC+Kxv5yBLoc2V5+bK5+P/5+8OCCiSzjoVi0 dQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6u9c9g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:09 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579Twgb035855 for ; Wed, 7 Jun 2023 10:00:09 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6r9g7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtRJC35ZA+Jl8tuLzXgdcQv5ot8k4IVBCKnp+O0uc2UAnXMZmP268qiU6oC2QPcRiC40vhFfZHvFEjzMCL43V+qQxIoclzrrhQ35CgsbYSB6naM3I6MGbQTcfOJ1cl0jsE7//stm6x/EdjydvPRxXQYDnkmvQTbw5XDwTM5n279zMndypbeoWhORG+bkQbbPvaBz0i5G6MbmMrRevir9ecgY7Ko+Ss3qm9jBtw1I/NYoaR95T28dzDFMLEYXVk9Woq4RtYVazdsFdKlH4bEnnT7xK3f3ztQR3ZQNhbAEhl5K+pLlprDG6lXt/f7v9P0Z2Pq2BUqnWrNxyVfSCL4IGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0LduO1exDaYAIvA8U8ZvPKe4jKKCbLPtgyUMcknqzDw=; b=TcoM+sMaNH4mgGxBKK3INh2vjGBoQIb0mggKv845oVUWpaB8CHtOgVm5XVPJBkuBiv1RSbHmTD4TdZQrAd2ZYUOhKxA+vNqwgO3hOuU6BhEljwZemjF2ppdR3w0UDxv+sP3R6K4exX4aN0ehpdxQuRUeGfIl5rQxxDZSkG2h8PHOd+lUqwbbgQ4ZB0tlz7rGSo8iK23wOCu50RScrQjFf7Iww1uI8mNeK4yDzXUX/7Dp7PDWuI7kMDXJNqWO9bsik1W5kthhdtOsNlhMnuke2IVxPqjC1yeMhKhpxru44oKjQHVZZM5YWFKKpx/BF8VIW+bni9FdlymwXcJLmjMoUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0LduO1exDaYAIvA8U8ZvPKe4jKKCbLPtgyUMcknqzDw=; b=GscV5BuicjK+IZA8RFF49orIlwJuVwcnu1/9gF3jR7ILi/tjsFShiVXfenJXgDTJGVC8ZBvXB2iG0n3Oz3DeTodnwEa+LqAtKoyAdMObup+/OwoZCk5EsGSvlF/TQMGUx375sYBcADcDNDDrIObPeAe230t7bU4rNFg856QCOUQ= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:05 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:05 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 04/11] btrfs-progs: optimize device_list_add Date: Wed, 7 Jun 2023 17:59:09 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR01CA0018.apcprd01.prod.exchangelabs.com (2603:1096:4:191::7) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 82058da1-d4f1-4a66-1b2d-08db673df81c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: flLZt8nibIymj+HjxC9LPhMxl8oW+FHCDn0KRlfxM5v0lovOd7k2nqDv+ogGJDMrVuHXDNzjTuHjDfr+0IVow2yJnH0IONDHctThhZ4XJ6hfveV1g9EdgtlKiYmiQEmQWfAovSmelIn6EQKkbitqw7lsHAawVn6OoYaiwqaHJyDuiXbFarLkJ817Wl9a6UfVrR5JYoxIr7G3J86CcfuEXT2vtnn8G8r/URseMB8srp0XAewnsZVgUfb4tOllMD9iXW2NoOf30xbjmh0HnIT34sMEgsbaevYIhB/9edT6ScGW5W0xkd7MASTGgGVeid+TNkSnYbnUZfFZD9MKWrDQZhW5ilEq7hriyj0/ett7k6KRqumkCFrUolhKgl1HCDpT+gPFKCNiJmq2MTZIQsI1IarwFfXRHW0cwAuZIeahe9UMhtGcxe+X1mazpMdr5DAA1cCf/8Tg+AP5wjp7oiEs6scz4l2dGSP0aCn8k9SQO0fzgYKZLlguNx4K6xCw+i0GH+ieqixtLTyD6PupmSIUs9/m6lJ9F/MraWtG9Qd1MlRz00wJ+XrmTLI6IvWc/tCr X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t/805EXY8PDDzcgawZxTfp0DSCOCSiqUd5F/mag0s7XBQnT4zge9ubeXrd8rs1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NpGow9WvVkBZJe9eWof7HE2ghqF7QHg6Hh2pW3eDS9GP2vw0bZaeJn0IlLZIcIPEZMNQ3QOujf8tiJAofVApkWVLryZt+V6YjjiYGAe/+0yCZc/GwKe2O1v5w+fMK3d2dsF8YNmh/2bDyiZWKMhqoa01GT8Cozq1InapvG7Dy4LLfbExTl137/pA1mgLvYmFtkdhlUU2UeEIWRgxQyjjTl26Xs0o5TfyehoYY3pMMRdenRjJ2TkhlKNQm8GUHG9bZ8g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82058da1-d4f1-4a66-1b2d-08db673df81c X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:05.8799 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yB14T6EKH+YY+/QfttXZgHOh23Um6mKmAArOyZdwcMgHHs0Q4gWuSD87mDckDovV+6E+5Z+sWUM/OzFCDLH1eQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: Sy250w8tRsozP5vgoEHqEmpqbYSfU_0Y X-Proofpoint-ORIG-GUID: Sy250w8tRsozP5vgoEHqEmpqbYSfU_0Y Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Drop devid argument, instead it can be fetched from the disk_super argument. Signed-off-by: Anand Jain --- kernel-shared/volumes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel-shared/volumes.c b/kernel-shared/volumes.c index 95d5930b95d8..81abda3f7d1c 100644 --- a/kernel-shared/volumes.c +++ b/kernel-shared/volumes.c @@ -334,11 +334,12 @@ static struct btrfs_fs_devices *find_fsid(u8 *fsid, u8 *metadata_uuid) static int device_list_add(const char *path, struct btrfs_super_block *disk_super, - u64 devid, struct btrfs_fs_devices **fs_devices_ret) + struct btrfs_fs_devices **fs_devices_ret) { struct btrfs_device *device; struct btrfs_fs_devices *fs_devices; u64 found_transid = btrfs_super_generation(disk_super); + u64 devid = btrfs_stack_device_id(&disk_super->dev_item); bool metadata_uuid = (btrfs_super_incompat_flags(disk_super) & BTRFS_FEATURE_INCOMPAT_METADATA_UUID); @@ -545,18 +546,17 @@ int btrfs_scan_one_device(int fd, const char *path, { struct btrfs_super_block disk_super; int ret; - u64 devid; ret = btrfs_read_dev_super(fd, &disk_super, super_offset, sbflags); if (ret < 0) return -EIO; - devid = btrfs_stack_device_id(&disk_super.dev_item); + if (btrfs_super_flags(&disk_super) & BTRFS_SUPER_FLAG_METADUMP) *total_devs = 1; else *total_devs = btrfs_super_num_devices(&disk_super); - ret = device_list_add(path, &disk_super, devid, fs_devices_ret); + ret = device_list_add(path, &disk_super, fs_devices_ret); return ret; } From patchwork Wed Jun 7 09:59:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270330 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 BB62FC7EE23 for ; Wed, 7 Jun 2023 10:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239870AbjFGKAS (ORCPT ); Wed, 7 Jun 2023 06:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbjFGKAR (ORCPT ); Wed, 7 Jun 2023 06:00:17 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B51C11735 for ; Wed, 7 Jun 2023 03:00:16 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576Jq8h026210 for ; Wed, 7 Jun 2023 10:00:16 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=rZRLSuZD/mJHZYqyasxuvJ/uZ9NnS1RtlEB9CLMOHxQ=; b=O/P9oUnk7fqIiAGrzysG8ubix/4PjxU5S/YT9nUdrmj77cwiAjKi/NLyveCKh0S5P3uq 6rAA99jnHQmfT9pnt4Hvd3q6dWT7BjYTre8Z0kk7HoFwUmSlJVg/etofqHXGfNJepaPd Ep6sHM4kjp6DaVG9gi9XLXersCGX9NynnGkBzOi4iCKehvqa13cNJsg5BoZd1mEq3MXg 3hYamSW28Cf17CaQ9dzSB/U8BdnX80qrgfrN6Yiwv3TC8ZG7CX4ez1MVrbPdhMxcIBdl O3WByQCUkNsXcXrcJO2ZXIOImEyzeBK1sgKlqdva7NubIZL7YS1gULdd5cI5uxnKfCIP KQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6r9cwc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:15 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579dWkP002962 for ; Wed, 7 Jun 2023 10:00:15 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6k1dby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RTq8K0ZZkGTtNcL8KcwNY28HqaddGzoufHvigLNPr/DngqcMsXh82v+WBZeY4FE3BXEz1F7nVFGCxNB1YXanSrnXQtbKIiG7M8pAzCbs+h7a3hjLaGOLmRgr/rxUKTbSowsXvFxgNvtltKUIOoeOnJ7qlW1tQcmsd3Fc9LqMzp9XH8shzZtscb9JumTysolCk+tZ6jrBBNwcj6aQgcCpvODfNLfl1PsHejcJT7wPG3YbwZHC9YBVw863JKOVShx62poGu/woUI1UqE/c6qPHRD72QYwjwcoZzmF1ZkZwzm3KRxDl+vJt0tzZ8VvdmlM1s/LLZbQCVG5WbTWSFif+3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rZRLSuZD/mJHZYqyasxuvJ/uZ9NnS1RtlEB9CLMOHxQ=; b=n9a47/oZZQsyjIxROTz9t5otRq/e3tXNTzcR2Vyc9bcMbNKA/fPlvoOzcfVHJ1p7y4CbqysDSb7BRSjV40RpK/K+jOM4dk3zRYCydZuuw0isaUr1EoPhAVPCqKPyxOFi5ci9J6WPOWeA84QYt+koDL6TmAC5DFUQQSLstktu+aIZfiC1DEmC9hq3ZuRQtG/uj+0P/hrAf3nqas479kV6inuj7qZ2h6+pRph43Z6sWzFpkGOpc4dHrAHPd2fDPsoBghU7E7Vbjk79JHF32VVH6yZxCz7RieLavo7BPdc8YFBez1RqTY1Iz3qCubu13/Q/UHsBWZLOGBr0zJ6JRgQA0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rZRLSuZD/mJHZYqyasxuvJ/uZ9NnS1RtlEB9CLMOHxQ=; b=H17Hsgzc4I57GF+8/Z9VyZqvyA8hrzKvQ8EdVGHEV5p/eeEeJFIp6x7ZHVGQUANczjYRS0zS5PpdwWRPd4BvYkHNvB18QZ8NJLOo2EpdhRcIEVF3fPB568IFK1iPUpTuSnxpSzPaFtbZ3y2iT33XTOrYcne7xioGuAcl0njy+yM= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:13 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:13 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 05/11] btrfs-progs: simplify btrfs_scan_one_device() Date: Wed, 7 Jun 2023 17:59:10 +0800 Message-Id: <98d656a7febdd9248109a4356e72773fbf34ee36.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI1PR02CA0005.apcprd02.prod.outlook.com (2603:1096:4:1f7::13) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f77d98c-f394-470b-0bc7-08db673dfcb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LJNBhCN3cBdES2xrknWSManAjF5Hm75AKwUcsy/CDoGd7zR6eQPEVmFpO9TuuU3OGz9rXDi0xEA0sJh70TB8SuNIftRrcGXdbtZl//eWMQ/9jjIxwJsKnjbaF/ShaeurFyM6Mol8/++Pf5jg6Egt9/nETHdHAdR94jOalC8Wl2KWPOgm4fQTpz0JpUO1vMqvC8VSbbPMEcnxBQl2qQFTNql9Zxk8q8yIcLcU0iF9ZysOMEJFu4Bm5kjJcroVmNx2lpenE6EXga0XmyGPiAdzUe8m9Wrng8s3iFkIKp6abPC5/9Nc8k3LtxNxvz3ojp27lAF2WxWfldxUKu5sFh8bsD7UjnUBIQuLXEEW3jboMuqTihGtRfZjxrUbFBLgtBxu+iJ17Yfin0dH8WGcRLqfeiqiPVfeaM+9YKocVfH2wMhrBk7Tn8W5wbk9CPcmEoGqbdXG9QsnzY1MZk4FzOnOgpNQSqorC6NedIL+wQPYlQcowyH4JHooy7Q/tl/v1b5NhpQEBv05viiSYsb5gfDW0pHbMD/Iees1zA8JG6VUFmhmyzeTwTMj2y0nEPf3urdL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UM2NCGfFvUv4u52BT0BlxUcy38dNGuObQZFJDKW36Jbv93h3bAV+7kht3kBb/4Ur9UrH9j1bcPNvv5QsePkPQO638hDqR7Qx+i46QOS2EmwSqt5u6tVuPwbNOa+jgZqvPXAMEkRYeMSV09Fy3FYZhdoV+jJ9zLdXpVInfLCjFU+o9zmHvdN4GNiZnBtdyUIQ4B3srs4saTqICrD0LFZ+AZI5f9OIW43rKYhwJub18HsdW1sROs91YGmaJxKyJKGay+810ZjWLElx8VoDmANBPe6Xur12J018p6hEFy51YcROrZ76rAjChcNeu7oYTfdOUnFUvpiYDtXbQo3mnnPTkffjo29YSRkgsrLs6eDYhmAVbQDLKpF3qPsh1CtXnjT1T/VB5PLTMot5d0Jj97NB/wBgyE+pRrLFTx4viB/X7F+WybR5Cis/db+oLjFo9IsL5blrs0odPwxqAD/tWFL7DYU/DASHPWe83+Pl60x9sKQ32MtDtCs0vr2AWSusK77b9mEkeMck+q6LIBMplwoIB3N9GpihSRc90K/88wsvbdXoOcrsVRF4PvVy2fYoTqDW4UccXtNljaL5DUPoaIxc+0cs1tMtOfjGrrUYufC5N+ZPm7+fwHLNsc19eiaCSOH0gT6LsdEYkOXQPvt5bQqLe55srCCNQ/0I7czrMXm1Nou11XZ90NIQcbb8DxGdm37OyJafIMAP9dGajJXyDH5PAS59Kfv/6JNyG6F169uM2q/tlW5IIyNXihINxq7Ca/ilmp34hQuEjXxAF1wKePfgdFw1lOlQvS2CBshZGOrHZpV60ewfuxdbyNtAOKTICXmHyAUvb+yzLgamDN0uhgCzK0jLLW2Hk30f91/HwGyrQA9EfoG4bljv3S65tRqt1LbAr0gsUSwt4lbTb05lJ4+doEpT9LtXitegjC7yj7LOSl9aJCcAORmEHsIjtDQIpgHap/2PigzyVtYHbNyccRyamq/mpTXutJ9SlCpcmPU+2eAV3qvA5wM5ZFnXJ82wCZ3RBa2M+HsXedgzpDtYnbeMgMV9iAW1eLRU4L2e61Qu5iQz7E7/K6MLr7XpUpd2PzOZ8hGAsKCLs9fO1runB/78BuxCsvfpPxnYytfLJbwy2GVV1uc4YxEgDw9EeweS42xP2uee6gfclYbVk3p653rNkX05jX0x7D0FMiDNR6hh+tX1nY+6+aWt+FWxfEB1x6617WyuwuS93w+2TKJJXRa7o9muwQQTqR7Zo3d6bZ9ch52o6GIAHTWHzD2A1L0NyeH83POXFaTV6h7G8m2jJerXjRcMb0xmygkmcyeUDfvxZHmDxhdo9u8Oh5K5RdtEjB9kQgN4QlXpY+30cLdRRmJzjRkSsS7WukCOJ9jpyCqMq7ZDZAn7inIw5wN3ph4xYEStgcYOO9ktdHb9B8Qbh+3NYBigPHpziqfdGd39N/r26fw4zpQdO3WTmwlebU2f7xOWVW7eVUjx5IXM8VUj08JYWujrbxIxMw5pmdZIthr4JenZH4vuyFBmrm+5nE6MW5HjS+X9NcU2h8ixwIfXhyptK/O9KLAorr0zjRiWsw8lZ9mjTM0QYoXuUdo09r1G8F3R8XAph9n2auYggojhUDrThw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7XcOBujDUT2suTrr45saKg7QGYmifcBcp2wLwMDkBQiasy4llzPHiN2WSZEQlI1nSFqj87nAySY9v6HYLk4MFDKS4kZnpRFolzeek99MwDvRXdta9OslWuSvpNp/SDVfCM7hwdXDNo9XRDvG45dJ0fa6tU1jyeyN00tu7n9bO5neSzQ6B2h5uzq93jdny1Apd4TSGSjAV1K7I+qaYrfScS/4PaPkp6zEtYReRKD8Tp1Y3ZZbXYRmCmCRZPRK4slu4VZgzFdEXICnChRxqrFembOcZLbD/9gFKOuDHaJFvauu7LzffUmuAXG44SrTS1e40OwmldDQyaXVeDu3jeJGzvlKaESOkPjN1xZ0kBa1H4zJ9LdztVE/hNYDi3TwVIotTm23CAzanYmiwIgHrOL5Ez2ZY/Aay2fe0L0iHyB/zF6tb58QTsqLECj8EP3g2I+PG3QRlNTCRBkIiHyQ/5lbmznBhnwTczhr95oYWr004uiEmLYHm+0xN06HxrIB6kh9mjCbewWsv1l6NEJHqtkHA92tEYJwoN6oPGUy/R6lOvQq6yyP2EoS0yNtPD30ryuiPACIfOnfWfW/CqEsFbj6pZQAGy/nJOnMsETHLl8GwRAkFri636sfzOHOlzDV84wdgBcJl1J6joU4fiMQQH571sqDAs7nFh9Q+GsMQeAK5oH/JGms/t5BwgHe0CvwlpxLgeARlOapmyK9gbAphPdMfsMWFtJGZmGGHm/vUJb7rRA6hSVG+7GQir/ilZ7pzq+uGvOBRoJQPaU8F721oihEBA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f77d98c-f394-470b-0bc7-08db673dfcb8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:13.4836 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZP4O0pdExv0gPouwr1U0yaYEVE3X8FuVgViuUDWwPeVyeCkOhPaP7ljoBV3AJPsKqZ8cdtVpeyK3OuHsTBrf+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-ORIG-GUID: IjQZLN3ZuQIH2gAbnFi8Ty5L3FvrAUcx X-Proofpoint-GUID: IjQZLN3ZuQIH2gAbnFi8Ty5L3FvrAUcx Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Local variable int ret is unnecessary, drop it. Signed-off-by: Anand Jain --- kernel-shared/volumes.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel-shared/volumes.c b/kernel-shared/volumes.c index 81abda3f7d1c..c8053ae1c7f7 100644 --- a/kernel-shared/volumes.c +++ b/kernel-shared/volumes.c @@ -545,10 +545,8 @@ int btrfs_scan_one_device(int fd, const char *path, u64 *total_devs, u64 super_offset, unsigned sbflags) { struct btrfs_super_block disk_super; - int ret; - ret = btrfs_read_dev_super(fd, &disk_super, super_offset, sbflags); - if (ret < 0) + if (btrfs_read_dev_super(fd, &disk_super, super_offset, sbflags) < 0) return -EIO; if (btrfs_super_flags(&disk_super) & BTRFS_SUPER_FLAG_METADUMP) @@ -556,9 +554,7 @@ int btrfs_scan_one_device(int fd, const char *path, else *total_devs = btrfs_super_num_devices(&disk_super); - ret = device_list_add(path, &disk_super, fs_devices_ret); - - return ret; + return device_list_add(path, &disk_super, fs_devices_ret); } static u64 dev_extent_search_start(struct btrfs_device *device, u64 start) From patchwork Wed Jun 7 09:59:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270331 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 9C0A8C77B7A for ; Wed, 7 Jun 2023 10:00:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239935AbjFGKAZ (ORCPT ); Wed, 7 Jun 2023 06:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbjFGKAY (ORCPT ); Wed, 7 Jun 2023 06:00:24 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80AB21735 for ; Wed, 7 Jun 2023 03:00:23 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576K1lZ002221 for ; Wed, 7 Jun 2023 10:00:23 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=md8s22NrjrDYjNiwJsiqYISTfgNvlvFKnI5RoPVMaDU=; b=ocNfuBqsY2Gon3aVV04zAoPLuIdRrAScNViCN6cuOxO95JyH7yFvThnmgraOpXD8M7C3 rzAGZMjMhmMocV2vNCH1KtUi0plBB7F+61YZ50LTGXk9Eu+Hvjlw67tw/M+iluoENuRH OxPbizcWiaR75QW3BBGaawArdbzsexaDTZBVmFBCmDlwVWQCFBBvTgb0WGOync9dyjHj 1PIGEj4317fCYwVRMrKeWpRoMIoFPANAM5Jx84q4ARqRjVf8xLD5cSjT4ndmDk3brsxT s3c8xQuK4vdpmqSUquwZdVQH8ditZdaMvvoboJa3k46abAU+1WkYkVsrh3N2kH5rP88q yQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6u1cgv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:23 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579ZQTT015714 for ; Wed, 7 Jun 2023 10:00:22 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6kh7au-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z3p7+c14BSiR6fX4k2q9j4xVLwR+wftW4V508a/5eH1vFy0YgPkIkWbP/vkjurswOSfUN8vYim2PY4/ZTyyLolC1DQa3mU+qutLY6s8ppuFdXr4RGxd2Lqk5y2RMiHtFn0PCuECjfkO4A4i5R9EvlHTBQlAdcUZhfE9BKovOrIjrr23ORCnL8X7TnYCCsnWbjrk05JeDF0OIZKmVQXMIzxTPK3LCNvZ1MG35ZzMnPRhLc+4XMYVocTPuI9XtaG0Xdxo3HMFF8PFGlNOuz+Xr6+czTPfUdq5aj5lR5OleFNSkGwt/f0YJJK/vJvFfLL8rJq81Zybj00AGydxF+c8R8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=md8s22NrjrDYjNiwJsiqYISTfgNvlvFKnI5RoPVMaDU=; b=ofAPHArW9oxiQi3vhJbRiKEudmTJoTO4tsb5103G3nZs2KQOG6nKDfP56RRh8/sYo0hTKvKAsl0frqsAAOAIuoJLVHLCaLZHQuelZUQ/GIonKTb3CktX2+as6GG2INAIyBwILWhBMCNbJ7B/Vg698h9lB//nwPUyNjT/reylbTLHsA2kNFDPt8lGq4ErQ+DmgvE7CBgmuYDi62e0Se/t3CN/FMgVLrqCCKM0ESUQibmTOFc6bihSZ9zK1ujjqAjp/dNVzJyXkiRWC1SQMi2AxdOx/pLCgS/NbQTQGXWAQ/lNmBN3Nk42tnKRAXzn+iSs01gRYMrMeDQB3mQ/FnmDGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=md8s22NrjrDYjNiwJsiqYISTfgNvlvFKnI5RoPVMaDU=; b=YeF0+5/FIoUGq0TuStJ4QAZQQLbFGafAym1MeST/zeE85nrVh5+Q3idequxnixpNy2QoJT1BVppUHYA2QbAsvrTqRemSeSMC3yjDlaf4i+F8gsgF5UXYVnRW0ij2+eR5rXjBie9CvVNrjiUZ9MF77EKCb0pMtbfSarmM0yll0+Y= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:20 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:20 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 06/11] btrfs-progs: factor out btrfs_scan_stdin_devices Date: Wed, 7 Jun 2023 17:59:11 +0800 Message-Id: <44721179d1ba7264ba8bdbbd160dde414ff3861d.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:4:191::22) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ebf2c05-8842-405e-352c-08db673e00a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GeqrWUKu0qlgmOP/apU7CbtXGd7PbyEOwgvUvxWFTbkWjgauK4KUKA2Y9+81R7Nzr2oeY7edNBvv8NgVc8x0D/XdrEF2hv+byOCOlcBUI6FFtSz06tBCVEYnggAXLgjaPwLayokA/YCrTGC9978BeVAHhGGfPGL6gXaXm0Z4nvrAbIPbHcwCUDNmFiBDjJLvCLQGiLZKgOV5mWR7duTUBmezMurYEIfQhvGq4ER+cclJbNKwBGoVX7WE7CklnImv2m2MQQcOejl2rGF4xgmTwIeGgXg89lAbjtj+XvzUSkMJCDITW8dRteePhRoKoaOLMWJLnMa5TOr4+uGftGrB45Oc5DXwuUpjm47Ncww0IB8jZXZLAtR3v8AUEYfXLGmQHEdTCMBPDCCoAq1xXl+d1h/oisuV19GGYi6JvCtmyS8T1HDiZrsYFhWFS9a9/XfmZucY3sGaymllnSGeo/l9D6HCh0vzrSdjdNyj/eil+o27wsT0UB5+idwfWhWvuIyGJ7HBAw2AjnCX8tNwwRqE8KtllZE0fFOysJbHuSZKy6TvwroBC2g+AEhr0X6w4S+S X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aKeiuKHgH5ny3e/zzThrDwccfKWz6vKrbYNeBv60IaksqE3M5rAer16o1/t01/vwiGIHi76FgPLjT89s7UjL53x4tasys+uBHJDTZdDpO2M3cFz6i4KHa5CIZefokAXN0YCYeFKNKxzB0XGtPUgKUJHYmpB5U0JT/A6jfXYuTlKuXCToZOUEjKYXiG3+g8TYtdD5l0iGDIjrCM1LnvArPa1Uv31OcxVCtRgxvLvtXF0GGguphR/elkOdYj8PoydXRzSQA3oQb2i4m8mbspdBvBw+YP9wXLRCTGrkYPa4b3KK08mhuDnlY7K84zCPzE9D5V18NaScjF/kvyo5uzw2m4TypBqexqks8Yfqi+282Kzkx+949nM1UUJtJO4CO95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Y2iBLpszxMVc9zC2pqVFVGdcsSNSc1v5pwCtxTs7iEF/I0ODxtgT+ceDSonUTVZavv0Wnw0ypRW+5JkOxCVe9GlBbH5ZaBZPBciS4mmceIm/o3Vgkr6LLdSB9O0a5bgvuetdqGWFITJZWEA1vS1BsWjixjiQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9Ot4bsC5cM+zt2e9+MFZiIzS9wuHqtyDF6eKEkMYHXauj6yCWd55/Ju3Ih6/f/xDR+4EQM+YEiQV1DZEUiBTnHiJp53YrrHOfKkpyLFrybwua/byLnARYpudyMirVa8B+mlP70QY7Fkmroe/l0ajM30HCQz/EuI+rdPLhsnlgAUK0bobSlKqHqpjs6TIo1lJOSODioGoAfUlx1CCyPwDoOvus5OWsX+Me3WiIKPRwFrVWvceZwR5NDTAWDINxUWQfl9eTmbVrgJORqA/JHKsf21hPN1FKLmLGKXPAHxzaZAHpuSxXTyHC2uuSz14fnE1jF85P42jsl7XKqWtcfwJR58Xq+4flRVwaMdSZxQr5woFukxrUU9MBrBWY1lQ+JhBhQJBwFNDQucew5wEcWlkP7AGpWTV8HGNyFtBsdDmbaiOwuEhKaEc8i5aXQn1K0N+Mw6KiMrHrwGD8RJmUkP5DaCm8IwtVxJr0sz71H/wwir/7ME3hoanIK3SaSTCdJJ0wIjNe8ak4cpaUCEP9hAEd+dz1Jeuzn02WBNUGduqQWYTsm7Tp9J0fZFpKh9i4vl2oOqixG/UlIc2eCeFT6vggDncc1qsK5FOYLoYjCo8ubgGcyM8GbisVyD62mj+vCByoNt8eKa6RsPyPQl8757oH9UaKOx7And4h4eaE+z8M35LgvHjrU9zmiLKFsrx4xXMBTsdkQFmZOT1k5N89SoLPMhY/0YKxm+YOKFt4VoJRverGMrWO+iP7tXfKZALMCveJNQUVRQMeVcRXDC/m1bpiA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ebf2c05-8842-405e-352c-08db673e00a1 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:20.1840 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uzieEUa4FMagtm0D+H9gBG5U1D2Jn265ePj6iz8D9a7sNvEB7ya7TPDJJkyRa3F9OF8HvOtFC4YQ4+hZqBV0GA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: 74N7D3gwE66pFnXNHZwnPCR4JG1MR5Rf X-Proofpoint-ORIG-GUID: 74N7D3gwE66pFnXNHZwnPCR4JG1MR5Rf Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org As a preparatory to take btrfstune device list from the arguments factor out btrfs_scan_stdin_devices(). Signed-off-by: Anand Jain --- cmds/inspect-dump-tree.c | 37 +++---------------------------------- common/device-scan.c | 39 +++++++++++++++++++++++++++++++++++++++ common/device-scan.h | 1 + 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/cmds/inspect-dump-tree.c b/cmds/inspect-dump-tree.c index 35920d14b7e9..311dfbfddab6 100644 --- a/cmds/inspect-dump-tree.c +++ b/cmds/inspect-dump-tree.c @@ -327,7 +327,6 @@ static int cmd_inspect_dump_tree(const struct cmd_struct *cmd, bool roots_only = false; bool root_backups = false; int traverse = BTRFS_PRINT_TREE_DEFAULT; - int dev_optind; unsigned open_ctree_flags; u64 block_bytenr; struct btrfs_root *tree_root_scan; @@ -456,39 +455,9 @@ static int cmd_inspect_dump_tree(const struct cmd_struct *cmd, if (check_argc_min(argc - optind, 1)) return 1; - dev_optind = optind; - while (dev_optind < argc) { - int fd; - struct btrfs_fs_devices *fs_devices; - u64 num_devices; - - ret = check_arg_type(argv[optind]); - if (ret != BTRFS_ARG_BLKDEV && ret != BTRFS_ARG_REG) { - if (ret < 0) { - errno = -ret; - error("invalid argument %s: %m", argv[dev_optind]); - } else { - error("not a block device or regular file: %s", - argv[dev_optind]); - } - } - fd = open(argv[dev_optind], O_RDONLY); - if (fd < 0) { - error("cannot open %s: %m", argv[dev_optind]); - return -EINVAL; - } - ret = btrfs_scan_one_device(fd, argv[dev_optind], &fs_devices, - &num_devices, - BTRFS_SUPER_INFO_OFFSET, - SBREAD_DEFAULT); - close(fd); - if (ret < 0) { - errno = -ret; - error("device scan %s: %m", argv[dev_optind]); - return ret; - } - dev_optind++; - } + ret = btrfs_scan_stdin_devices(optind, argc, argv); + if (ret) + return ret; pr_verbose(LOG_DEFAULT, "%s\n", PACKAGE_STRING); diff --git a/common/device-scan.c b/common/device-scan.c index 515481a6efa9..38f986df810f 100644 --- a/common/device-scan.c +++ b/common/device-scan.c @@ -500,3 +500,42 @@ int btrfs_scan_devices(int verbose) return 0; } +int btrfs_scan_stdin_devices(int dev_optind, int argc, char **argv) +{ + int ret; + + while (dev_optind < argc) { + int fd; + u64 num_devices; + struct btrfs_fs_devices *fs_devices; + + ret = check_arg_type(argv[optind]); + if (ret != BTRFS_ARG_BLKDEV && ret != BTRFS_ARG_REG) { + if (ret < 0) { + errno = -ret; + error("invalid argument %s: %m", argv[dev_optind]); + } else { + error("not a block device or regular file: %s", + argv[dev_optind]); + } + } + fd = open(argv[dev_optind], O_RDONLY); + if (fd < 0) { + error("cannot open %s: %m", argv[dev_optind]); + return -EINVAL; + } + ret = btrfs_scan_one_device(fd, argv[dev_optind], &fs_devices, + &num_devices, + BTRFS_SUPER_INFO_OFFSET, + SBREAD_DEFAULT); + close(fd); + if (ret < 0) { + errno = -ret; + error("device scan %s: %m", argv[dev_optind]); + return ret; + } + dev_optind++; + } + + return 0; +} diff --git a/common/device-scan.h b/common/device-scan.h index f805b489f595..e2480d3eb168 100644 --- a/common/device-scan.h +++ b/common/device-scan.h @@ -58,5 +58,6 @@ int add_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[], int fd, DIR *dirstream); void free_seen_fsid(struct seen_fsid *seen_fsid_hash[]); int test_uuid_unique(const char *uuid_str); +int btrfs_scan_stdin_devices(int dev_optind, int argc, char **argv); #endif From patchwork Wed Jun 7 09:59:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270332 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 F32EDC7EE23 for ; Wed, 7 Jun 2023 10:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240058AbjFGKAb (ORCPT ); Wed, 7 Jun 2023 06:00:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbjFGKA3 (ORCPT ); Wed, 7 Jun 2023 06:00:29 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC5E1735 for ; Wed, 7 Jun 2023 03:00:29 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576Jrek011462 for ; Wed, 7 Jun 2023 10:00:29 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=0hZoEqUHVaQ7ZD2hlYCI7nnEJdDUH2/D44dggDLBexk=; b=AQ8ps//JdSTel5TbWihDDmGHa89M8aF+2DXKvIHfT/2uKgVS5tS+DRB0AmbaT/yifqmN zUXGqzVQAJ3mN84T46H4jpvUBneaiALkSbqsp5Is+mPPAI7Uz8HtzLxFhO2bGGk1ijqP /tyFDgIGLyRE0CNSi5EkjIRi2iOi1/Wni6LcpPJIAUgZW8nzCQObCOUps0PwX/n9jkJD 0kVsS3KgreJunhzYardF11yyjZBpWnNCGrAl4hBRaHX/icGKXQ6cgrRkx8sAFvl581YK SaqXj14+cEVVJ0RmxIv7sruD2f+Rxj1PbK2UtgFD5ggQv0ONrAATSUaH7BDLldkRRB4P MQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6uscve-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:28 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579fhMo037092 for ; Wed, 7 Jun 2023 10:00:27 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6r9gs9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GqG7WywbbRJifttIgs+7gmq/xXDCgu97iGh41BMWLoWhsUxwMWXwpfqFFFFlOLw64V++P4nH6w5qq1gFZ+8HfeM5AGY8h2RnYEJUP1dbBW50Vjob/du1/gXBmZFSOvarM/m3DT+ZtaIQqPxTIhUHqEG5mR5EOTLkpXNEcf1F7amSxoANSnBWUEboXwwfbt1oGpZy95w/xmnYhqXZo8CJ5ELGm+9zW4lDmaH4K4f/nnfSoK91ljRXOKAJrO/dn7GZdVFwLfbCsf5nbjhUMWODq4+I3aJKrdwhG/94agmgYTwOOk3B3+zGjGMNlAQe5o43bLi9zv8y1xp/B6Jj0mRTZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0hZoEqUHVaQ7ZD2hlYCI7nnEJdDUH2/D44dggDLBexk=; b=Zz9NdQt8QJ+y1R9xmVCwDKsVXgqmO0A20FcjGO1Fri363CHJu6LFYzCdTJNsBFKjceU/0EufFcY9b8V/doAd6n2dgU2IvttLEbIT/CYeAYftzzVMCWuE0IS+1utiPHXV0+P6J+uouxgfCnrKAFwk0YEFluWzt19Jz0s9bxhuaaiF0FzcomR9FhskPpPd4YIyfca9eZlqgzVoeqSBht51lfxGpYWIpIL09ow1RYdcONBoGKFNfXlbK6OOWKZ2SZhIj7dGHkupC3/5U+aifzvyzl6KtwFr6ViLNC0wUepKYJrqNSKi7Q95N0XUuzLzt+n8yZ6SvsgY4eJs/Gc+yhsQkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0hZoEqUHVaQ7ZD2hlYCI7nnEJdDUH2/D44dggDLBexk=; b=PvCkwTXuHoA3M1VtUSjnVnEKX1GTZMUCrA+dxImlCXNSnY1sdggJ2H5V/8Qp1drKEPqt+ebwlNnTwsgC88QbUXkpLL3YdPedNpHyRw2NHUTp2Tn76w+5YqUWzOX/8pLhvKuLFNtzdKUfWcQ9TonQbPjlrEO7sYYX+GFqOcPPB9k= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:25 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:25 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 07/11] btrfs-progs: tune: add stdin device list Date: Wed, 7 Jun 2023 17:59:12 +0800 Message-Id: <6f4f5eb0d897033b6e4105b93ad4f1de422e6487.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI1PR02CA0035.apcprd02.prod.outlook.com (2603:1096:4:1f6::8) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: e9ef92f5-e695-4611-f941-08db673e03d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kWB9+H+HEqaQp4zCv7vg+U5Ra1LiuqSNp1sOTkajVz0STPZwGtWcvT+Vlrls6a/mN69Cu2kTqwrUyOcBBFzpHsLmIGHKzbhMRo1bgsvkA6Wa9PMXyOAVJviqVzcLCYMfds4YXHVsepN2/URVIpkSYwjGeTCTp1HW6an5yjTh+EUyyZdNEk05mKgcsN0C5tL1qDlIvD6NTMW9v0m4Yr48UkNlvO9GhBtwkmsdYVlU3Sa/7ZGV9+4mnOpUZVxPChWQ6Ufllw7bLmEQ7Oqw5B8pxyMevrgJdXbCI1H1iegBPCUHdf338Kt672c3l9ER3a0ePJyVtX997t+NDW9hm3ycGW0ligfPYLcEtL6ONqhwab5a4n9WI+L+7OZ7RNa7ZjgUUAWkAI2bxby6LsGlkXn/bEd3n+qV6XGwN6S6DcDs1a/RrBxI01FNNZgHHdj7tW5L7UB877ahoBqFBkpJg1k01YWLRn9VvwT6eMMwLjD+S1mokTn5iZ0XweUKizpymSQ5BL+7UWRWpAv8rwUQVXLfUvyR3Mr83cgU0Haf0qiC2hbwLsBgj+1nVdLO5eqwDkln X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(4744005)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005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yZulc/gblNRq81aNdffQUu7R576OU/x9tGsbWJkqXf74grDQ7JEEk/uKH5wtZUoom5nk+BZi2BjsHQ0Cvora3Rz3AeJa4r1vFBkWXLx2eu/8k8CwPLaJAF7d0CSyIqvqJHOQfQISvIw31iii/nzpfhumFrqYDDr64lKtP7ZS1yWG5cdAkiDfx+PFsYJR04k6MM9EIIXC6VMb8eGslu5Rxlrce1geFzbSPtm4mcx1k13flTbyyG1D97KFbqFjBOfsGyiVOeC57zcbtPLMP+PMAKosiDnD0p/bY5vNoUQiAAlDN6zv/qMG7s1MNMyJaM7S6Ec+1jZSC/IkbEmhSIkV8tuqh7+PG/EYenKvlYIcX3AgyG7nQqaahancinGSMEPtYaMXNpdfRGmDv5hQcW8T88ov92RsJRMkD3w== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9ef92f5-e695-4611-f941-08db673e03d9 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:25.4305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bEPTsiye2RiJcqKS03GcaTpOeBgMu3kmTvD6e+ag93lMEteP095yhcEASR+SpVnWb3w/D1WB1GZOf1NalJZv9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: tUTWBzx-ViJzjHcZoZTLRi3qBxM1rhYl X-Proofpoint-ORIG-GUID: tUTWBzx-ViJzjHcZoZTLRi3qBxM1rhYl Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Anand Jain --- tune/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tune/main.c b/tune/main.c index e38c1f6d3729..2ea737bd0c0f 100644 --- a/tune/main.c +++ b/tune/main.c @@ -232,7 +232,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) set_argv0(argv); device = argv[optind]; - if (check_argc_exact(argc - optind, 1)) + if (check_argc_min(argc - optind, 1)) return 1; if (random_fsid && new_fsid_str) { @@ -280,6 +280,14 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) return 1; } + /* + * check_mounted_where() with noscan == true frees the scanned devices + * scan the command line provided device list now. + */ + ret = btrfs_scan_stdin_devices(optind, argc, argv); + if (ret) + return 1; + root = open_ctree_fd(fd, device, 0, ctree_flags); if (!root) { From patchwork Wed Jun 7 09:59:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270333 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 4609DC7EE23 for ; Wed, 7 Jun 2023 10:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239461AbjFGKAj (ORCPT ); Wed, 7 Jun 2023 06:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240085AbjFGKAh (ORCPT ); Wed, 7 Jun 2023 06:00:37 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E4CE173B for ; Wed, 7 Jun 2023 03:00:35 -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 3576Jtkh018042 for ; Wed, 7 Jun 2023 10:00:34 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=EgqiLk9JFJUD6wCdMkIRGRTWKubUOImJ4OrS4+jF+pc=; b=RyQ4OYfsMtlYb4bJ3VR2Kj6ye4AWddwzdcuHZUCJTu2uDrgMhg2at0NFwpGbuC84wARy kVBdLeegcIp7DiPoemrFhjuNbztzKGgAnHg0NyzIB/ceNt/9UAjj9vob5a0F7btgMsDZ o0y4Le320IMDxXliaZ1aOHg8UAjX9WXaCi/YSVin3xW6BESpnQKwQTMTCvm/SvhuvFgF N9DK0VRI2MQkFxAVldUikA8K+1iPsBYEYxP6iuONyBvuK8NMfyWc6OnyTf6pp0IL/HjY O3pLR+203DDAZJv0vqcjH9JxwlGeDprYUKqT7nZwTtYp3xkYzAZ8zOv5pqmc0hcT97Xe 3g== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6u9c9w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:34 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579efnS003011 for ; Wed, 7 Jun 2023 10:00:33 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6k1dub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GzFEmLXsrxm7aAzbVqSsIkb/V7T5EephEVaKGozgq7q6CIjLyCnRu05Fmca+AkUqgo25ic/H8QODNoCVfZfkB5smfJz8dLRxvOntOJMNYgoPCSJy3nIlxOYzJQp6bIaCEkPlWcvJIz4b99BaExKK/tMqFDNYV4++jJqCCLCn5PqFPfAnqTvyofol2SvXgcR7q637Iuf531TF80B4tR9IcnEGVWBjgjWXLF7UyZmzbTZ9X0f4xZ4ry3v3Ic2b7De3pU3ZjBBKDA2Gw2NWOoJc94/GAiyWG/UYCdmKMRbznO+DjvgOtERntY9i2MmRYib46xOSIlspolrCJzGREU41SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EgqiLk9JFJUD6wCdMkIRGRTWKubUOImJ4OrS4+jF+pc=; b=A9dqcZlHmRC9XJzvpeMQuz7BgB99I6Xp6+AA8XQyb/XjHBTeIh4f+8Kc5Fawyc4I7E58+smzRkBdq35k8O+0HhF40t0C6EiX5e+5AD9Bwue1ClXWNntoEwPuOOBKA+zyNVm3THDmSSEwSffBfyXi5Xgy/B5LY4Jv9MgG1OTjl5XZ7LJfXMmKAsNDGFFxqvKD/ga+NRM2ge6NPsOfu5ctLdYkXbPXKuXzgAo9rS5bPhQQEVLZ+7Zdwt4PwHbWKDknaxTyoa1Pd4zxGmuv6chXa9Z03WYYcuFrua809AwjU8gR6jvqjEQ6hmLFNpvgFMIj7IHGRDbdFEVefQ5SdGuoGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EgqiLk9JFJUD6wCdMkIRGRTWKubUOImJ4OrS4+jF+pc=; b=K0lP1nyeY31QBlcadpDDo1lYKLpO3QTpjhJtoOzimLvNtv0N4qgrq8gGrzQDCYr6WNYnmxDTeIfUg3ezcCqK7nCazn0kJpVMOH3GGUE+zbjIwdp2JZWKoHui4wW0tJw5kbWa6T/aj6iIDr8BJQRxOskUVHltKcsT+Qx02NumHFw= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:32 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:32 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 08/11] btrfs-progs: refactor check_where_mounted with noscan option Date: Wed, 7 Jun 2023 17:59:13 +0800 Message-Id: <610d67e87fa1020c1e6dc5b12bc457912474ce3e.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: ceb84226-2962-4fc1-84ce-08db673e07c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X+txgP/q4cBsgqP7SKBUcJuP+bT0fvgf0B12ydDRC9j/R2DKXguibusXlsMeWpymT3ZV6odfpDG+gmmo7O6Je54yDn6U6LtYkgHZE0P48fLxIOQ3ax+QW8D04xDt90sg6srQgYzPZ3e+3S4CYNc6E7gMdBg9gVAUZh5CUCzX1kKwI0m2APaYh2p2VqkzQ1JeDkinZxzujE8VqtK7+fERci/MkMlnwbhhcs223jTNXhN/wyN0LOSRIfZ6kD9gOxA2lweQfMacmj9TeWWDOLvt4NZn45fTqM4Zqp7IaV0MfeaD7Pm8NR9IwhdjA96JzLToIZbUUQt2nlX6UB8aAndqidDpN5IqwVIJLAaP9GkfILh7yYh6h8bwXE6CGYFK8xTFRJucrIij04molFvqtk/kssugN1wqh2QemP259lgbDgbtOakKUY4CUkWZDWMYxOqzHgrp8jWwdCMoGfo6AGAktm7wdPeKp9orcyyw+SGY1sjnUEc7AeyxJd7kXXSnErVCx9FqZ9Jn6RzGntP47YrjFgJezEzYUUcn5xiseVywglxn9eFzAccRhsuWUaiE0K/k X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: U0DiQvpimB/zJfSCnGecFrKqYlr7YO/USo4roIGf0Juuu8RPiYEIO1+d3Rl/L357o6ZfHj7/hKyRmyGohkvatFosGAGmMevy+etv/q8PlfZLF/HScFRCzMOFU16f/jP2Xnl3jiPPHk6R06t4PZo7m7B1JM2efWkfdOXG9WR2tZGuTEzEh1da72eZ44D/245knA51/ApaVBQh518e+0Bs8j7KQcrwRibepsibCt8tYAz2crJQqCy5/+H5QJ3fh7j6dpMPkqN7Pz2QrtUllKf6gbRL+gxZ6g6JieBVHNFaXL61ZFCMRBRLbMuZlAlaQ3X4UqgBuesDANy4Nxhg+tjI3Q5Ol6GSaeTJ2jbeq6sSVHH0KL2GbsMYPQoqFGlOeSCmjb9wTrVsarFnYVs0yNJnEKvfbP4JxPe6hZx4JFpeu2J/6+ZqGib/iJiLz6LgdrRd4ws5JeLD0B4TjTtdT+j8uOKmXP/jOYrDVTpbanUN2UglWNIWC+xm1ujmHYX+tPw3kgq4D6hxyF54wVN18So7AoNu4I9zfYMYmwOyBAuwuh2L4tA4ldVkH6Ne8jhMoPCHLM4VFo8rKG+gHRyZFHKLlA7Azyf70ZEqptTrdxpdtmxSc5ZnjD1Pl4bp1e0zim24PfzDfTdVaVfl9Z0F1zko3BW/qvQAeRCru5LBg1MXUbQnUvU5kANB+NUCAdhZ/xQ0hFWlCncCBf5f94aITlnf01I8IVJEC7tNz2zd2rPUsjDIuJA7rpM/K/Xjg078a1tYFUkFFek1AHZk2IbRpHm6RT8swQjWL/HqbbbQtdG5eXUEHzdLPUJhHNYifUftz8dmREnr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6kSBxgTeLKtPKe47fZULmDJrCDllhbgyRDtSOqNQNOxuzB28xIebHTi8vpSX51mxaX8iFsn+yEscc6kJCqMhDeCt4jUeDcmU1qEbcn8RLMEfhmOuXKbvYHAK4V34f82BSa+Mvnx9Uo/m5POIg7zs4Obtqb6Fkfw4YTSpjN3f3fVEPoI/VB6Qu3rn3DYzZ3Q1RN4bkahAWwU4PBHB4jN/6Kqo1zEXBMe+kLrs92fhFqAa6RqKnelG/W5o0vkrEGUVa+7pdJReyW2a08b5CaxljACneaXlb8mCH7zSIXt3e2v8gxQUkuSghBJzYTWrj2HMMmwXo6eNrJfgEvjSwBvAdX5mhh2Io3pCCmSblZIDFtOnoQ/5j5N8/5nUIwLgiOiQK86kGNARu0NzfTGW5SD18nkJK9RU3xIz7m90UduTHPPJZTVm/wsZCf5onejHMjaHA0TuZCxhAqSseJVtLxAAYXGCVla2hC9bIPC/Qu8sJJbwRYFBT3LGQlzOHozhEPUfZOV1RgPHrKzJwSLjn8GLTIuzW3GY+5s1MY0ldBCA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ceb84226-2962-4fc1-84ce-08db673e07c5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:32.1742 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r3Vr7TfsiQzQ7/AKtUbiFZlV+H5ZNINt0HdLZZOJi9cvCFGfuufQMN2gzqVh5mYvgoym+ZIH2ARuu8iABKj7dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: eYKcn6k56O8i7ynG3IB2ZQ4wleEueOMX X-Proofpoint-ORIG-GUID: eYKcn6k56O8i7ynG3IB2ZQ4wleEueOMX Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Anand Jain --- common/open-utils.c | 9 ++++++--- common/open-utils.h | 3 ++- common/utils.c | 3 ++- tune/main.c | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/common/open-utils.c b/common/open-utils.c index 1e18fa905b51..e34abee97f60 100644 --- a/common/open-utils.c +++ b/common/open-utils.c @@ -53,7 +53,8 @@ static int blk_file_in_dev_list(struct btrfs_fs_devices* fs_devices, } int check_mounted_where(int fd, const char *file, char *where, int size, - struct btrfs_fs_devices **fs_dev_ret, unsigned sbflags) + struct btrfs_fs_devices **fs_dev_ret, unsigned sbflags, + bool noscan) { struct btrfs_fs_devices *fs_devices_mnt = NULL; struct mntent *mnt; @@ -108,6 +109,8 @@ int check_mounted_where(int fd, const char *file, char *where, int size, } if (fs_dev_ret) *fs_dev_ret = fs_devices_mnt; + else if (noscan) + btrfs_close_all_devices(); ret = (mnt != NULL); @@ -132,7 +135,7 @@ int check_mounted(const char* file) return -errno; } - ret = check_mounted_where(fd, file, NULL, 0, NULL, SBREAD_DEFAULT); + ret = check_mounted_where(fd, file, NULL, 0, NULL, SBREAD_DEFAULT, false); close(fd); return ret; @@ -168,7 +171,7 @@ int get_btrfs_mount(const char *dev, char *mp, size_t mp_size) goto out; } - ret = check_mounted_where(fd, dev, mp, mp_size, NULL, SBREAD_DEFAULT); + ret = check_mounted_where(fd, dev, mp, mp_size, NULL, SBREAD_DEFAULT, false); if (!ret) { ret = -EINVAL; } else { /* mounted, all good */ diff --git a/common/open-utils.h b/common/open-utils.h index 3924be36e2ea..27000cdbd626 100644 --- a/common/open-utils.h +++ b/common/open-utils.h @@ -23,7 +23,8 @@ struct btrfs_fs_devices; int check_mounted_where(int fd, const char *file, char *where, int size, - struct btrfs_fs_devices **fs_dev_ret, unsigned sbflags); + struct btrfs_fs_devices **fs_dev_ret, unsigned sbflags, + bool noscan); int check_mounted(const char* file); int get_btrfs_mount(const char *dev, char *mp, size_t mp_size); int open_path_or_dev_mnt(const char *path, DIR **dirstream, int verbose); diff --git a/common/utils.c b/common/utils.c index 436ff8c2a827..b62f9f04ad5a 100644 --- a/common/utils.c +++ b/common/utils.c @@ -230,7 +230,8 @@ int get_fs_info(const char *path, struct btrfs_ioctl_fs_info_args *fi_args, goto out; } ret = check_mounted_where(fd, path, mp, sizeof(mp), - &fs_devices_mnt, SBREAD_DEFAULT); + &fs_devices_mnt, SBREAD_DEFAULT, + false); if (!ret) { ret = -EINVAL; goto out; diff --git a/tune/main.c b/tune/main.c index 2ea737bd0c0f..9a6223f4aa0c 100644 --- a/tune/main.c +++ b/tune/main.c @@ -268,7 +268,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) } ret = check_mounted_where(fd, device, NULL, 0, NULL, - SBREAD_IGNORE_FSID_MISMATCH); + SBREAD_IGNORE_FSID_MISMATCH, false); if (ret < 0) { errno = -ret; error("could not check mount status of %s: %m", device); From patchwork Wed Jun 7 09:59:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270334 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 22B67C77B7A for ; Wed, 7 Jun 2023 10:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240149AbjFGKAs (ORCPT ); Wed, 7 Jun 2023 06:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238911AbjFGKAp (ORCPT ); Wed, 7 Jun 2023 06:00:45 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E911735 for ; Wed, 7 Jun 2023 03:00:44 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576Jrn0011465 for ; Wed, 7 Jun 2023 10:00:43 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=fXmR+Pb1c8prEnEQkYNE7BKalV5Bl2iF+OlONFwjVpQ=; b=tHvEk8Krs9HS4yRZfYmqAcjpzh2TyvpEVMEiDlt1Y2I8DzdtvjM3jnbgL0EqDZY5BTtq zz7K9Iq8H4SwUaC/GZuIPMzQFrcFRJco2ZoyMOnGv229LUQOOYELejeoJ74l71O3lT0e aSQ/qU9sgIoPGsuMT3rV4Ff3KvwQBq4aZwWc76O91yx9FpO32ZbSL415EQJeNRy7etzw OLGx+IHqy9V7AZcZ1SuHdyMAcXwL9DL5ZW0gbkCkec012i1DBivzfILjvCJmKZwCJcw3 hNFMgFQN3QAAT5ll8cW4kTM+TH7PSPXZpscx4yL1hI098oHCIRrI8NuFRQdhqvR2kEED ng== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6uscvu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:43 +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 3579e7X6036887 for ; Wed, 7 Jun 2023 10:00:43 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6h12hv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Aux7HxiwHKNAl7DrzvkRIeuiBHBqmyp7JvyqQso/Zq5cevQxpgwk0Wfn2KJ83s8DyGmg7drw5/T95D4tlmWXS/VSzOJ+f7eQhbvIZaOm1nzxXvp3X0a6kmHsfWt+v/g3s5gvNIzg1Gg5qbyHyfQU20wLfCs1stp7vO2yHaWcRkKIBcsZlhuJVzx+bpGcekOctyLRxlsbnB6ykqT6DlMMGmv59fgsSUHIlBjKdZhXrpwWaGMiGGwNkcaGxiHbLTKzDAGaEOf3B9BD1gAIM4KYdJUcG6vspB0HX68tX6mEUa00Fv4BYfMT+lnlHNOC7trKmHfMIFn8OrZSC4EHF4zr8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fXmR+Pb1c8prEnEQkYNE7BKalV5Bl2iF+OlONFwjVpQ=; b=CzfOR5zGO3tAy4iue9V/zwcluZyy7hMqyrhK6+fcvtFCBJxgXksUdgLPgmy8rOn6Jc7IOG8/KWWmXhFL59u53XaNRHmFC2v0ZzaU71UyuycYbnbw2TxUqL7j7Xq/BiUUhehylPOvwd6d/69DbCIH9N6EEgwmQvZT8QxL0MlgnhNDShmSRUgbD7S2Li4JfJZwIjtbZAwObqxMnMBzkWnN2lKQMXvzahxbKFefab0rime6wzBpld23V1FJZkkd3INJ8Z0HsA5UK9J4U6dWBXCzccU8DwFxPn/HDj0tKAFHrUSw8tqgKB3T5gtsTU4nJpcsaf2dmEXO5KaIoo15hMY0EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fXmR+Pb1c8prEnEQkYNE7BKalV5Bl2iF+OlONFwjVpQ=; b=neovJfgayZ/YCosmzYwaX2MbWGwAjQIFAS+WPmgjIxffeTS4y4BT5VWch9ipZhBNLi2U1mkehSiFQS9fk+y/pnxCGGyV50VP8pNJOT/Qni0Pd0cSoMsrEeuJQtRA1l+bFnipNXrmiHyPxkS2waPBh2zZUGPoPSJYOOxcUW5+fWo= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:40 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:40 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 09/11] btrfs-progs: tune: add noscan option Date: Wed, 7 Jun 2023 17:59:14 +0800 Message-Id: <2e199f307c89151e46d9b66193259ad53eb04595.1686131669.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SGXP274CA0005.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::17) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ca8affb-e6b3-45b6-f859-08db673e0ca8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IgW8BDDMU3eMQ+7pCt4d1E7AhV2qsmqglWWZawK6yrEbILK8Refid35mbMEI/z/oMaoou0JWLqbPufbmVlnUzJZ3n+pGvbFAtjOQJ9+h5/JbzqZo7xEulmLU6m7PEmsee+Ib+HDOScj7KQN86/b2E72wTgBp+2N65FvsJOqX+emTKbhtVpoxgd6twYUVc0GNEZve8p8IN9vt+Glo3e3QJk9prxgOuKUf+GdlZSaxlYDu+GxPQsvAJUzy46uTv4s6n3PYveLdg5xNqx36ELqnivT7BvR0CCUHPfCjoNEYF1cCBtDAAkvmS8J5VXETV8995HI/RDlMmx1T8Ec/ceFS+W/apXOCSyfVl2KCuutxqlFw+X2rKJib0L0a69oUgqkATfWOJ4HvdtBW11kTFF6tSawk107GppflE/8K/FeMnkmzlSQhCDtBr75SzLyXW9qHjlUJTJbfqmj+Wt+di1s9oN5gMxCPUHnFwhjCLMse0IyY9r6EhaBjVYTi/bhKL8hzdm63raOKeGUW8JCPptztueiBC/Q2Gx2ji2Sf0lDW0xU0Ml896xBlBu5VwXv0APJD3cTRknfJfOjsXTHt4wjatSQudthPD6DthM0sTCVAe0gkvT3qOrPFV4yJkZnzzx86 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011)(461764006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V07K399cr587SbtwvTpjZf90Ec3vAKxMDvpJp0pjGDNgM6sb54Zm4c1Q5X2NyRHZAU79R7gVMVb3soBKTtZ30La7ivsRqsJXJkuxoRKPsl4efTKRqk0L8piSpOR10ap6jmOUpic51MDMonyAFYqyzg6kccaCWy9WXTpmtMk+YioTgHKp69g4rlTFH93OsuGhMunZf3tqON58bc+PA7esKER8fcM+9rX17dyM/d6uTuWkoEFJ3TZLE4lc18JqN0LiLgsvxbejyEb06zJawZnIRBeX+AH3RppUfGcMcts3MW25K3Q3a3wularYTaMvoJIW5CiidbVWWwmGhkzi8eiVIY3H0fIkbp/TH3RJCpkgausK4LUa9nHGTaQ5iSQi7pxztikmHVmnJNgviGTy1s7mO4idxaPQBv8FKsKMgcAZdsH7lF9qFY7afqZtmJ8NkLXyMJLY6he2AOajd3+DA4S9Oy2XmVpNrPCi2PdVZHqOPoaKrgpVApAE853gduHScI3sOXjBGlhgS0gAz5S4QnOAvMOcOVyN1KmUUhUjIS2K3z8giH9bDlZPz2+HYHCedAhCnq7dR8dLLwSb/9RJX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S-Exchange-AntiSpam-ExternalHop-MessageData-0: 6OXwV+odFW4KkqcTZ5nUTnelOSs8UGVN9mfjdAkshINtstfTzyqJfYRlwJ6e/d0cDC1SgDsPzr7KQP5P88GwoPVa3/RxwCpgIU01uTNsIslOzIYHlJIUQn5GCDLIbX7zKTattvYaxqH8OWFZ5JgBGcvvB3Fktk6tVHX+sJYol/S+1om35Sv6hSd5iISyHY+lO457XV2PY/ribxWgH0g7RYY9gBgagzJVZZMFqadsgY6zK3OSZn7RKHq85m5LL0rxSRHgptdCYOeBTzmYedOXsjIsEPRh3io/J6//D6GLTkhOWDr7Ypuk+G6kkcjoQSRPyyj3ssrWk6lkFi3CRmnHqJPDyLsJ8UCWQIqmH/QCn33y+w6hza7p8GlWgvV3D91OrU7yZPMZvRCN5YbLqnL2/yRSiczPOSdMjU6+8ZnOpW1B7R7P2cJ4/ID6YgLsZnjEYzOM0sJaNuumBjOGhSqqoi8RvHtbpd5JYoD9x0NXmoU851LFvvY+4F9J+B7hqgPSdf9Qj92tKjZhrCD4PXWxcZ8J3vhqndnPtFF7MyiPFDmY73NAwx/4LlJCwuu+f6NlR3cVQ/E9QVVr0Jk5mizRaXvfTrGZDBNJ3GvIb0r0NIXz48aSdP1AIvgAN3cr2ss966SIbsY+YvYTQIiN4s4hMYB3U/E8hptk7rzFQCEPK6HznOM2YYJm5ylSymPOnXZUYShPZxGB7T/PKhxmFkown7COxGgSaOari1/Woh64RGBOkkgTpOAA6uXUJI5J1oMtQ3aw4Ywz/kBJBkuCBjkR2g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ca8affb-e6b3-45b6-f859-08db673e0ca8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:40.3666 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MVkiz6ytejh9472tmXJCdn8yNMTUbd6GSeRbfMZ/YcMnYnypg/I9utSqWKvY+bjPUAf3qwGf9vAB8/+qxWAACw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: 9PMN8DXlsefnW65UwY3BiT4wcXWVpvV_ X-Proofpoint-ORIG-GUID: 9PMN8DXlsefnW65UwY3BiT4wcXWVpvV_ Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Signed-off-by: Anand Jain --- tune/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tune/main.c b/tune/main.c index 9a6223f4aa0c..fa49f1685e0f 100644 --- a/tune/main.c +++ b/tune/main.c @@ -143,6 +143,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) bool to_extent_tree = false; bool to_bg_tree = false; bool to_fst = false; + bool noscan = false; int csum_type = -1; char *new_fsid_str = NULL; int ret; @@ -155,7 +156,8 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) enum { GETOPT_VAL_CSUM = GETOPT_VAL_FIRST, GETOPT_VAL_ENABLE_BLOCK_GROUP_TREE, GETOPT_VAL_DISABLE_BLOCK_GROUP_TREE, - GETOPT_VAL_ENABLE_FREE_SPACE_TREE }; + GETOPT_VAL_ENABLE_FREE_SPACE_TREE, + GETOPT_VAL_NOSCAN }; static const struct option long_options[] = { { "help", no_argument, NULL, GETOPT_VAL_HELP}, { "convert-to-block-group-tree", no_argument, NULL, @@ -167,6 +169,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) #if EXPERIMENTAL { "csum", required_argument, NULL, GETOPT_VAL_CSUM }, #endif + { "noscan", no_argument, NULL, GETOPT_VAL_NOSCAN }, { NULL, 0, NULL, 0 } }; int c = getopt_long(argc, argv, "S:rxfuU:nmM:", long_options, NULL); @@ -224,6 +227,10 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) csum_type = parse_csum_type(optarg); break; #endif + case GETOPT_VAL_NOSCAN: + ctree_flags |= OPEN_CTREE_NO_DEVICES; + noscan = true; + break; case GETOPT_VAL_HELP: default: usage(&tune_cmd, c != GETOPT_VAL_HELP); @@ -268,7 +275,7 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) } ret = check_mounted_where(fd, device, NULL, 0, NULL, - SBREAD_IGNORE_FSID_MISMATCH, false); + SBREAD_IGNORE_FSID_MISMATCH, noscan); if (ret < 0) { errno = -ret; error("could not check mount status of %s: %m", device); @@ -289,7 +296,6 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[]) return 1; root = open_ctree_fd(fd, device, 0, ctree_flags); - if (!root) { error("open ctree failed"); return 1; From patchwork Wed Jun 7 09:59:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270336 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 ABAE3C77B7A for ; Wed, 7 Jun 2023 10:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235500AbjFGKAz (ORCPT ); Wed, 7 Jun 2023 06:00:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240167AbjFGKAw (ORCPT ); Wed, 7 Jun 2023 06:00:52 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E30C1993 for ; Wed, 7 Jun 2023 03:00:51 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576JrnQ011468 for ; Wed, 7 Jun 2023 10:00:50 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=0a0TGG5Z0Aph1syHsauEg+nQtzcUZXpNjylzOh9oHv0=; b=Di0QdnKoOTrBrIdt/5sy1IKSf/aATykE+MSt41IUIhjd2RBoyauuAfDuT706M2RjcFwC L++oUs+CpmY3bwaO+rSpM2mmm2aho30h6Gb3zAOLp+k2nnCkChHM6lJ7fQJ+kBTsf4NY I5JtODvLruFtak+q3k9Ckpwn4sHc+0+xIYZ+hCssWMSxuKqzMIC+YBYim7obkUQjAKqQ hON2gFz5OxdLBEuE8juQ67DLizyeIXt1o1pHQaZicWJ0k1z63tt3UQsyRBldVj3sxAIo FbB8S9klk496IAz4/HwrxPgu3qug/BglGm+fX1Y4ZyOg9MSYuPqd5ovkTTz8LY8288Um +Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6uscw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:50 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579eaRW036799 for ; Wed, 7 Jun 2023 10:00:49 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6jh8bh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ayBabGFEi7womecuKBqrfuUVAKtIwCAISd+upu0ZgD+rSb8RnHP86+Xuc7m7jan2e1qO3Lzz8jocOWgbyhwuEkAFWxrzyUXbOy9qzTb1DI07WynZ984+cSXAf1DMBUalXwBl71s6AOO9omRlzNKdOabYfls1XQoZ501fx8X4C+bXDw/UKWCcVdV8bAPrzx24Ps9pKxrIBuGge3AKSE4e1mKYuKabgdimm4iD/FCSrxNhh8wT8ajKlJ2Uw05PXkPb9SO6StppJBx7TLE1YwgkZRKG+SJvlCUr0nBna37pnbAIwvnU6GTVWHrEHgVsAP+B2+RQzYfBxrgH4RIYHi0mzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0a0TGG5Z0Aph1syHsauEg+nQtzcUZXpNjylzOh9oHv0=; b=EkodWs4fBjKg6jMgPfnfotqBbjwD3UjkGS3tlQHs7deTSJtIbcrovwWNtSybBWrg5yC4zRjdb/HseezQo6DTKrLFrFbAnLM0k572E9S4ea22BH5Nkf3XJeZQDis2dqtqEirakt1BQ3ytNwrpVmDdfwWggL/3EN6SNCVQ29yKL+idVx/X2Qv8nO6TTDPeCM9EwPUs4l5qbrw0HzLhDmuVCZbxkehaiC5V6jY4lF4D8YlmlbLlGf8ZUmLwHtP/AEGEnxCHSNH1jJhHNvaW5EG9o1HcJWypXsa6s1Vxn2HJEf2edRZnyNoW74Ibm+5x+Z+Sjy57Mskf8gNan/2v1tdpMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0a0TGG5Z0Aph1syHsauEg+nQtzcUZXpNjylzOh9oHv0=; b=mUk/Ysw/7CpC4XfylNijI7kx/zLfMVOaDRn4PPXQCagBVDtI+3nCH5AcDYnXbDxu+SnYLhoucL8mIP3XklHTRJQtSRGbdMaEdObFVjojOMmnA9GonV/DrS5F2D7RLCF40Z0v2SnojZ5jja0lJrBjr4VblEi1ML2rL4F91T66iBA= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:47 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:47 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 10/11] btrfs-progs: tune: add help for multiple devices and noscan option Date: Wed, 7 Jun 2023 17:59:15 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SI1PR02CA0022.apcprd02.prod.outlook.com (2603:1096:4:1f4::16) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 4bc4b11f-3248-4339-bc74-08db673e10ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KgKMtA1H75NyIPktNdCjGwr+6BQfBXd9oHaW+xXluM2yB+DE5FacDV54icQiaae4KCy1JpuP8XM6b417/FdsjyF0EdCVQOS4KGzucgGrfYZ6q8Cv8pFcHMSKujWBWfNUNlHulQ432eEU/ddJ03rLXKxl2DqA+rjzyVdhPE3lPmfn/W5M/7nphW1yDIZ3NCM9f+tMSSHCxZeK+4yOsENlwW+CsKCbNV0NA+HIyEtNv8d/5QHY0twrWpPl4+JoxFavEGTprWzjqQMf/AvctOGqlLJkoSdPpm3up8uhWv3mBWOqMllZS+6UDjy1vwCzehKSa60zy8IuKp/7/WHfMJVEOd+1Lt86sikwoR8bE/amnDRIYhC31LAG6grilhiLiM7B3MLC8PNZbeS3UAXAwQlmpv2L4oACXGPENPTszCDmwUzdAhq6FkUsQdGZFLEXG8SrR8uPaSBfWg2DLa7xtJ/lS6J0+1pMDr40wB+oqf6kHhtine9ykhTKi4+4M6sDYRkxtYJRczmk7lpnYWgfmwTo2N/QzKwljlfXQvSNVTkCOSYplsLKRhcHh5aqrUl/2qHl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(4744005)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C9QbIe4JxAooXaEgnYIB7pNTG3oA/lAXAITpCMDMBflNGd30lNGO/X9Hok4LUDpMIFO95FS4mcSk449nGKtviDt/jvoE3HBmdnZ4brWVeY8NNgEisklbrtg356gxV0fsNglKlXxpjKszRF6lj2ka0KGrGD2TgWOzwqyrV5f3GsrIh5ODo8ssbrZ6QfZd13TLJFmqkpmFgNdC7VK6Xj1gSXcOjg0c0qI8jHXgDvL4iLy0z0iTICy+ZV9Hg6q2FzzEsjz4R7lQ7UU0IGQUilEtTkEnNIpNOe991PWa5KqTkM9IHHfo8HjlUGTmIZZoqHEMMReTr5HL+z9EnxBmdCuh3/bvRyT6QwvxLuOLnmQqhrmu3SXqckOJ3G8KFfwC8Ki7VTre+5gSzPAm0/PotFtQm9VuiGs8KrgKkf1ZjUjUG3lvy4YVB3TwfF3jjMcrl+fcffENI7pn2XEoNvwI0AD1LCUJNjOqmkYXVc4N+ZfNLRxvSToWg74xM3bZoU7CvtujmK1bt2gCr3EOh5EjGFjCmVkgPMK7e7B8ocLVIwDyIgMpgjDzWp0fVDC5INw58iEOjuLpN/gsZfrBE4ch+0zQdtaurtyp4CmmeYOzuyDA2Vrw0sCaGL3M5S0tQ+3V7Dh6oJmLv2SLXcrTxpv05Lkx3JxhZ9VUIufRJslqWoUY0RjG1kYgxbVWjXs6s366Bag5Z4fQQSnZvjkLR8MNtZqxhcLXwHGk2JQRx0yzT6VoKRelXHqqd1bxaQiHv5NLcgpYUYr2+sv5CIs6i1Tza/Y4MKN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aqdcUTBLkmtGl/VfzZ1jtbgJ9bcXoHGGDqGh+Ep0T4s3PuMdyH3R4LqLhxeiwT0P8qnF5EKwNiWVGTVK+FRK1cLzKJXGhV6emHn9EM0g9xBVeHGtrAG6Rq7j8AmfOZqxBbL3BHcSCgVWS/mrEDDPhtYtzGy6lSii4CzJAAFXxK7MSZyEy/+w3m2sere8FYM9i1YayrI51kIFw6yKdFph20Q6F1Cx3LoaBsZ9i8JD5Fy++uQtPIkPh8HVr1Qk84Xg8iSBT0aY0e7Pzoz9gT2ZPAOj4mVn16nGgPovJwmghhuCrNPLUkJ7aai34EwBtkhmvK6a3VkAAzxLUcb7VEzgEVgdReDpUzR4mYQzq8wAdAseUmtKWjukYKM22woDxdbTLDEuRJ427awww5VY1WtuBSZ203Wa9P/4hI9VMM5n12DnGKJ+2h7OYBb5O3D4/Lj1uKJfDPjOqgRgtPaP9ZLHBWhxjC6rdDn5rz4U7yOYv6ZO9DG5LkiqJSiQ55D6gaXxYQHkhnwH/w+7l2luoFieneZB+l+vDXcwVMjE96hpqlxP1fsEyFCO/k/c4sIQjDPdkJM6ZuqBbc8e4RghaSbp9eEkVmpxnRBL8dx+zOTyPmtQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4bc4b11f-3248-4339-bc74-08db673e10ae X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:46.9318 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uC+HBKTgHo/jaVG75Q/2Nia5oCz8TNRzw1DDwGktZH5cT4J5zhMUXvkxIHdrCWbjtoG8BTRa4PEeY779x6eA4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-GUID: iWDz7oOxfhgSv9HA99tV6RWAepGKSy5w X-Proofpoint-ORIG-GUID: iWDz7oOxfhgSv9HA99tV6RWAepGKSy5w Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Updates btrfstune --help to carry information about the multiple devices in the command line argument and about the noscan option. Signed-off-by: Anand Jain --- tune/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tune/main.c b/tune/main.c index fa49f1685e0f..dd412113ec4c 100644 --- a/tune/main.c +++ b/tune/main.c @@ -94,7 +94,7 @@ static int convert_to_fst(struct btrfs_fs_info *fs_info) } static const char * const tune_usage[] = { - "btrfstune [options] device", + "btrfstune [options] device [device...]", "Tune settings of filesystem features on an unmounted device", "", "Options:", @@ -117,6 +117,7 @@ static const char * const tune_usage[] = { "", "General:", OPTLINE("-f", "allow dangerous operations, make sure that you are aware of the dangers"), + OPTLINE("--noscan", "do not scan the devices from the system, use only the listed ones"), OPTLINE("--help", "print this help"), #if EXPERIMENTAL "", From patchwork Wed Jun 7 09:59:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13270337 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 840A6C7EE23 for ; Wed, 7 Jun 2023 10:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240167AbjFGKBD (ORCPT ); Wed, 7 Jun 2023 06:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239059AbjFGKBA (ORCPT ); Wed, 7 Jun 2023 06:01:00 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E602F19AA for ; Wed, 7 Jun 2023 03:00:57 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3576Jp7I017112 for ; Wed, 7 Jun 2023 10:00:57 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 : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=vNpbPoUwNyQ7QlidflUeNqzCM/+hMxid4pZUcx+RPrg=; b=35wyTJdR2L1uBm7N1SsJw7ZzBvdGv8H61Lhq8w1kpE1kXSVC4nQLIDL9bQ8xWiF4Yy6P L55SN9Ub0h4iVYXAe7pFbNKvkTaW4uipLpgvzCFWJtuzNpjwstXQr7YIWM16LMLXmWwp 08KqqyDFlLzyX7U7uFCVYyrirYoSGZhpU8kVDK45WkpAzGZT+1Y4xhsD67RlrcYdFpty 66+OqfAk8Wb0qpG7uVPY4YDLl6tV4Ukmp+yA4lgcO4hgHGsOnzV/0hpN800X1ElHHQlm 6+/GGvfwq5pJKpH7fvibIJW9zJfxMM3hFRF4ThrciG/LxL3hqwwH8RQ6TBClUdyBscLE 3A== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6phdjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:56 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3579cKYZ002953 for ; Wed, 7 Jun 2023 10:00:56 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6k1emc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 07 Jun 2023 10:00:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=duHjQ9tlMnujj6Rr5ZavQPDcg5oNWxHTraFVwMtQ7A0zKEBAdBWbdr5iT4LYnHRDfqjQVUtUtKfPvoOMqQdv7TrxaXamDNstCO8FQWkj4yP0EtiBCVi1yqthxRT82k0Q+mAn5NWmHiKNVmYkoBqNO52K3JEHd8wf+2qcJqEsM8PnMCcMQWXVBiJGh/FDy6zHSdSFzVAVucCoqxzxmu1NV9thvM8Y/T6vY5Z1wuqc6/wncTZPGwWhRzQxPCKPhBIPTK171xi7Jg7lYzzP3HEaomnWlBVP/6eSbAOSNx5Onjxn/IS6puCrAItacVrGqjCm6YweRMldQQjg37LewD/8ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vNpbPoUwNyQ7QlidflUeNqzCM/+hMxid4pZUcx+RPrg=; b=KB4jvv6Y6VGs+fTfcUAc8VR8DzCTeravEm6Jz8I3z7V9nW8ck5ux260I/jIKzJqTW/e8/PFd5QlWNC6A+wBSLvVrmOGHAoWVXZFDFBcToxVd3REVWUOGK2HknBWf5JJzw28zGAkg7hhCBLUHRSxlMwWIMHPHAajxj78j0QUq0HQnBVrPijk4EZ7xA5mwmwQluYEPaDJXfJu1lCWKkS0hf6Dss9AcFRgn3Zv5fVYOZYhrSe8OHxQEPi6pnsvDAlwQ9BGaT9KLrQ+qgr/+Z442OflVncGKTnkaZ0tqCTLvdHOQDTpWodrl07AmVQV36IVykLp69jcABTXFfMENJB+Kjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vNpbPoUwNyQ7QlidflUeNqzCM/+hMxid4pZUcx+RPrg=; b=STIJaY0qiigRZhNzR1/WvoYUTlzVnwubr1q8Rpnyx+CQFYsSTW+zR6vrKgd9YEmkLbREApRXoHudozlbmp5ruBUAqPSPTkO6Rwsf+tguaNj8c61Cx8OqNxz/Qt3O0SVSFNyycmDRIwodqY8hCrf7tMCP8gNj6ihpuaRpH0iR+24= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA2PR10MB4762.namprd10.prod.outlook.com (2603:10b6:806:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Wed, 7 Jun 2023 10:00:54 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::bc67:ac75:2c91:757e%7]) with mapi id 15.20.6455.030; Wed, 7 Jun 2023 10:00:54 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 11/11] btrfs-progs: Documentation: update btrfstune --noscan option Date: Wed, 7 Jun 2023 17:59:16 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SGBP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::26) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|SA2PR10MB4762:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c2ed751-2211-454b-acf8-08db673e154a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BOmAadAV7NR7M6s1NQM1Vupt48QVvIJlc0ztF+3ce0CrlTbTfoTTe+WiQ07H4pAoJNpHANm3zs9lj2Wz758IJAuolxMwb3NWgL8SsMBugXNOHc5Ekd3r9TTjX5l/Y8VGgUwhvP2BItHWrtGD6zZuwrY+X1J/gHvv+yHdfeSpZJnIxmDXcQI13mMqYO97/jpZE7lttj+pIYPyqwz6URb7GbMpBqN1Ua96wUmmusHC7lP4rQxpsV6oxJ9CZ6b7DlzDMzcJdvYAhp0NVJ5qApIMz86X9GdktJ2HBQq4WlYWDjk+0TZSxL6ZWZCs+C4xb8QlO5igvgwVgcr/z0dxe8pE2HKJ3fJ9EvP82OB4r5bZKqMkGFXfzFXjiDxnRkFDV7JnvH84ASW8p6KXiay1VWz/b2F08MX84VnLt3V9Vg5KOCBLTxn0bYxgZfo3Uxxe2O0Udcf0LKu+qAyYz/aPACl2zVUkt4zFPQWXoA4aA07R1qeQHZQuwu1BFxNrlUqf3LJ0Qpbr6/5Q0UlcsxIjyi2mHJCypHnj9K1QCsSeuHrp+SRX2m0SdOhMpi7SYqGW/tPC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(366004)(376002)(396003)(136003)(451199021)(83380400001)(4744005)(2906002)(2616005)(36756003)(86362001)(38100700002)(41300700001)(6486002)(316002)(6666004)(5660300002)(107886003)(8936002)(8676002)(478600001)(66556008)(66946007)(66476007)(6916009)(4326008)(6506007)(15650500001)(6512007)(26005)(186003)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BRyZ/8YZ6Zwux2f0PwFhYQR3Pb3GTN9DPftS92c7nTvacGYoHbqyWvdCGUTiS34zm9lP8iz2egiyOUH9d0ld3lL0ss4osaS1QZ1iHujaYGKNmhem5qJkdoTlzldyg3GnGdOmqwyFfTrMY0/Sk1TZx+MMz9MlyeppoU9tpL1egXSz9Iv206ktccBaL/jICzVOZvdKkScRKmRubgYogWVFb/mkAl3e5aGdCrj7kclwnI5+1TFFdBCBpDIIV2OHfXymEbai7cHemklO8US3l1FqN4uM7hqlI3bs7JJmrOx7q5/EP/xdE8R3ma/nW1FcKg4qB128WoO2nR07JflMwEkZrrq0fipl7smRNf0pMTsKE6BjC/CI0fHAcERP7cWDogoywdCiZh07gXbyix6TqZTP8dWIHHepq66fLwuVf5+luJyvPO9Yn/JKi1BmGSzLEBlyyBa6fGeX075staGEPGzaFu8avR/zSowitbR4WSZbwGMPu2to0lHEI8DDMDX/6MW+/y68fGCIo2TQNXAldzCaoikgTknFHYNNbHc52Wb1XGYTsucnEwHNQQwzgmnL3YclsXbpfy03Araqy6rGnciFV1NHaDAu8WqX+eaAYtCQKHY8cgGai1R2TtdhjnMU27tZyd6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ZlkHZvOK8qTt+JFxaLJXSABkDO2LgQB12jMXE4c63XCpEeWKgErwpQFwUseK9mSY+Gib1A/xRyd3R8YGz1V51CKPx8j1qaYIrL+Y32uvFvNDoD/d3RJywsXstXEBV+LghToMaqBpc5bWiDhgUIvxRgyoRNGngXZNdsXgJtYclTiykRpJxwNNgxBCvWpSWd5zza92XBz0Wd+KmpT6wqr/Rpa9MABCSdFZnPyNWupDvbv3BRGWieoLFNfcg2HX9P7X17+FVEZlTcQLSIJsPKPvTmcWTWl8yaO8PBV0jYJH7UybOdgRlPukRTRRNW7chiW3Sbvon4mkALowT8T0SMrDQDGAd3bIId//H61DvS4OTXUCACAX+lhb+CsSUDb0EtvwI6L89LvaTIi62J7zW3BlOTBJbK9rryjGkdh57lLqwVOUhZZ0k+vJ7gndJeu3bP5qF28amIHVZK2tdxXroTGHNNzo74q97wo36Q/gqx9z2CfDiMuMLq9jRbYQ8gU6L989zFTQF7N0nClw0pi9WARpV5FEqTeOsvLj4frpKkiQcdDWMiNT8k5eJb8+zhJFjxWbFD5caNM9lPMCfP7g+LjgoQf86XIiS8js5jBSXyecJKBVdqCFrhVytCCtfRnNQZioioLeUgwFuvqJDkb0CCCrLPlW32GDxRcMZL632BdZXIRPRfsUpS3PnWPAjFWqudUfeOGzZI5gPZ+/5nIA7v9Say64sezAFrBcZ2giCdjl6k/yEskTAt+M1E0exHrhIEJH6bjsK3+GltMlJWA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c2ed751-2211-454b-acf8-08db673e154a X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2023 10:00:54.6634 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JV+fCZH5c/k7awAnHRwxY8dcpp36EzCLGokBf0t50VA5poAugtVwy0n4XJxIQaoWQepkuQcuS/G78ClHtzykDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4762 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-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070081 X-Proofpoint-ORIG-GUID: pqeZq0626wRyVONtitFjGHFISAaZlm6N X-Proofpoint-GUID: pqeZq0626wRyVONtitFjGHFISAaZlm6N Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Update the Documentation/btrsftune.rst to carry the new --noscan option. Signed-off-by: Anand Jain --- Documentation/btrfstune.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/btrfstune.rst b/Documentation/btrfstune.rst index fb643fb8d27a..4cc89de7359f 100644 --- a/Documentation/btrfstune.rst +++ b/Documentation/btrfstune.rst @@ -46,6 +46,10 @@ OPTIONS Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure that you are aware of the dangers. +--noscan + Do not automatically scan the system for other devices from the same + filesystem, only use the devices provided as the arguments. + -m (since kernel: 5.0)