From patchwork Thu Nov 24 06:40:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuezhang.Mo@sony.com" X-Patchwork-Id: 2159 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3227406wrr; Wed, 23 Nov 2022 22:48:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4yG6FXBg/t1SEahFYMeHRUm1A808kLAN1vJTlIkkvhvccIKHK4rAhF0yvv4JUMAof9Q9R6 X-Received: by 2002:a17:906:381:b0:78c:b8b0:9d35 with SMTP id b1-20020a170906038100b0078cb8b09d35mr18253131eja.586.1669272488234; Wed, 23 Nov 2022 22:48:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669272488; cv=pass; d=google.com; s=arc-20160816; b=rXbCsq+/dem5QZTuBkhs2fUVWKKwhBAdMPY6CzCo2YFMO+HdPwXJ2OawaxYcJz+nqx 9l/BzYXJhS9Fu6SldR4MZqZkoDhCI+NzZQCaCca79XUY5+VL0Va7oxbnRU4Jwu+q+yu7 4NAdr0Z/B4SyovATgOkVRk8oNl0P7fiLYZ53aIYh3jkR9j5j5MqrXClPETL7RRcVE24g 5PO4ZTW6BRVLDEdBAnkGVtc6/vlQKDdiHMGeEkff9ClzVsy3GL4zoaQkoggpiInl/ly9 s5aVRUUntm4JpbUGzshVQ5iOdyzpsLcLZrbkBC7MO2hdVBJdgulOzi9hSi79nYYNf650 wREg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=emgSOPh0cF7CKC8IRLSXKMNrrGNdYnarwKBjiEfuu+s=; b=l5K7kE9r4z7vgTEBVKVv+w2R/xdvdOcq0eBlz2P52q40XCFPSDEJdNITaV/vJysbsi S3u0bDc/z3w/KvjCGfnUuHe7FSr+HTJJub1Q9KGIQRewNlp4ICPfqSGxC5Fh6d62hSxn w8zDrX+y+p1hrZ7QJi9BwIeA70szIqYRux7LDqxyjDv0jx8spek8e/vlWFAils3r7LXM +bYLL2yeDWww65gxL5f+ojURAENLf7/IPlbZ6XIwQ7aZoS/X7n8PQ0aGAp+I7xBvKPzL Yv9Ykei/Pcho8NF05r1P8hsvY0wNX+QFsf3hTX/ncpYkJRuL1wWOCy4p1AnrYczIfEY9 MguQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sony.com header.s=S1 header.b=ZIYcdR2X; arc=pass (i=1 spf=pass spfdomain=sony.com dkim=pass dkdomain=sony.com dmarc=pass fromdomain=sony.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sony.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br13-20020a170906d14d00b00783c42d2da1si159271ejb.425.2022.11.23.22.47.42; Wed, 23 Nov 2022 22:48:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sony.com header.s=S1 header.b=ZIYcdR2X; arc=pass (i=1 spf=pass spfdomain=sony.com dkim=pass dkdomain=sony.com dmarc=pass fromdomain=sony.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sony.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiKXGkw (ORCPT + 99 others); Thu, 24 Nov 2022 01:40:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiKXGkv (ORCPT ); Thu, 24 Nov 2022 01:40:51 -0500 Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4DA8DAD12; Wed, 23 Nov 2022 22:40:46 -0800 (PST) Received: from pps.filterd (m0209321.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AO6OH5q001748; Thu, 24 Nov 2022 06:40:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=S1; bh=emgSOPh0cF7CKC8IRLSXKMNrrGNdYnarwKBjiEfuu+s=; b=ZIYcdR2XWCLD8+ImzS907cQouBvJ+wPqqHOWJda4p4muU4NB4CVrRjwXFQAHVwr9S33W pUmWAc5CDSvpIYVMsS/Z03PXXMh7E5k8350geuicT4xQKPCxRPlK8hkk7qjWR5J/tA+a tCjBGlW0RYauvigR7kK4Ocl+Rk8WXJNYjq4eTke2Ec8eVkIeV41/0iLfNou9gc0b1oXt 0sGeEowwBDe6eAGnvEF1RdCZTsZD/AmKXI3a/Q4HeIu+4E2iZc9LzPRCEsa3mPMvaqtK djd19/jzDrqYeqpyWEQB55W4yPTT1VDMXqYDKoE6hHRRoCKkPcryl1Ac9p5Lgut6vtiV pg== Received: from apc01-tyz-obe.outbound.protection.outlook.com (mail-tyzapc01lp2047.outbound.protection.outlook.com [104.47.110.47]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3kxrb94t31-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Nov 2022 06:40:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Undr1rV5azglOOXD2XKFwiLrlpIVhCq4c6Dp+MEU1FzPgJOfC2XUmTGALW80JisAzPkVE+mv/V8taBhm1GVn2KBKgXwgsF8dup9R15apG+qyM4aqGZpCmqvkd5eGCz9DiYAx4S01i8BukL91hJYcynz5H84FyCOR50xaOxKu1tjSJhPgPVz7V8VZVPg6X3ttNAWKF44ME0NXDA3+lv9zIX1dormstqDYTEZcKp7lKmrBWpDBGz+NrJEGR7C/cQYqZxwmI+7LHjtrPAT/vImymZO9j4rpJ244D1lbzDNt/wAhWA7NIZC0MVp5svmhWNAnP3LCVwl623b2Y5MgyWOX4A== 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=emgSOPh0cF7CKC8IRLSXKMNrrGNdYnarwKBjiEfuu+s=; b=U6AtmMNc8xO2Gcm4/rRwtj7jQjbAsi8MpXwEdZgA5WMlS8/EboP7mNkrrNU2hNpS8N76ZOIHCavAHLxuCA8tKgsfnwhVNoKmPrMPNTqM5Jpqyxc1P8tGdLtQU5xqp8lTNI2dfYPN4qTVAqaZtDrd9jpNAr4CwV7BNtdPBSe7n7CGDp9Y18LWiA3nK2OyzBnRRt9sk9L4MP8G1MIvAfr6JeaXNNIuqfaHE56YQ7YA2UMSamgQGBIyjYMtE6i+MyXY9ztVA0cYC2S3gswXsWqieHfU6JaGP6kM1tUpu6qhikf+m4sV0KkEJnMSFVB/9Lbu7O+dH9/GpRpuaTCuYHEluA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sony.com; dmarc=pass action=none header.from=sony.com; dkim=pass header.d=sony.com; arc=none Received: from PUZPR04MB6316.apcprd04.prod.outlook.com (2603:1096:301:fc::7) by SI2PR04MB4425.apcprd04.prod.outlook.com (2603:1096:4:e8::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.17; Thu, 24 Nov 2022 06:40:22 +0000 Received: from PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::708b:1447:3c12:c222]) by PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::708b:1447:3c12:c222%8]) with mapi id 15.20.5857.008; Thu, 24 Nov 2022 06:40:22 +0000 From: "Yuezhang.Mo@sony.com" To: "linkinjeon@kernel.org" , "sj1557.seo@samsung.com" CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" Subject: [PATCH v2 0/5] exfat: move exfat_entry_set_cache from heap to stack Thread-Topic: [PATCH v2 0/5] exfat: move exfat_entry_set_cache from heap to stack Thread-Index: Adj/yW2oS04GQk8XQ3WWnivO3zERqg== Date: Thu, 24 Nov 2022 06:40:22 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PUZPR04MB6316:EE_|SI2PR04MB4425:EE_ x-ms-office365-filtering-correlation-id: 1df7b470-8720-4bff-0fb3-08dacde6c2f0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iddjfi51aySt6uhQnbB0SFH+bAIQ8aVBZG3Vd6KB8/UG4GJ4XLO4EWiQgCUhqgPdvDUwtS6Q8kQBWRQfKNLrKm2PIe6dv0txbIZTkpqU3SfoIX6AYi6dmn+NY1SBwKvq9UPoqLIz90Oshu7OC4HB16U2ODeAAej0jGvXVX7RB5DK6m7W06FlEI4S9LzkXbIJa/KeWtYtYxmQs8j1rMD63AlK5VbRL1a5fUeiWhigc9OjiEheUHiPro9DL2yph8VnbFO7WTHSqn0Y9U0ewTjkHfQ7hPFhCsl+GrRNTJ6jOlU3pRcX/X472azMdwboetDRo7a/myhJxVZ2b1TvcWo5WLBGQyQjC8TlMx+vgvqDaktfQzgC0az79FPfOxDccnRXsDxPdzAvTUH1zjqNVl6dsOeVfbQTSMG9i5LjIrKT1PQWCqueJKTrwIMrSHxUKPh9wWvy/GhAWIzhskfgqsNzykTLSWkDC8vzWF6SjiDDF7kGfber5Hn0nWfqh/g/+9nC4FANKzIy4rvV1RRHgT/v7DVziHXN423CnOm2erWswhnFAY/+hwV/yJEAClfBR2Apr2ITdUP9BtABPpUkV6Xy82nJRn+elfb1xVcHRFOrOBi8VkJbSMnbJmfs8ApafvsVbA1o6AW3pLxBHgES9JYLwLavSg6iKxxLoVnrfEl/VPuU9rkoW39Dzk8KvcH+4BT2cUMnQF7OJUJNpRjE7Lbpbg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PUZPR04MB6316.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(366004)(376002)(136003)(346002)(451199015)(41300700001)(8936002)(478600001)(4744005)(54906003)(4326008)(5660300002)(316002)(66556008)(66476007)(66946007)(76116006)(52536014)(66446008)(64756008)(8676002)(71200400001)(107886003)(2906002)(7696005)(6506007)(9686003)(186003)(110136005)(122000001)(26005)(38070700005)(38100700002)(82960400001)(86362001)(83380400001)(33656002)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?S8dAR49ZIHh6324KmnH3wzamSDRB?= =?utf-8?q?2lv83jaLUk+XwL9W5UfG71RUGBxVSk1tdVMWXXZniQ7colpJJCEdj7YSTb76KE+P3?= =?utf-8?q?3X4VjI51sPJ3KWogEI+qNAtgfTiKVDYKywYCWgeQkmF84UG77GP+n/iKbPIgY0wqi?= =?utf-8?q?uiU0RUo6/yHkcwdPS9SB2owQiMIttDZCe78hT5zKS4nLdsCMhRzotexYzzK9C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CoQBF3HvTGmDUF09Zo/vZ5oXjN7c2sd0NymwC7fb4L6hZRuEVR7dxvm4IsFMQUAlKkrz6NQQIPfbs4w0xIfderXL6X1bt5XiMj0gWEtosTTxsqGmDtrmO7U6lAHvTTKXjIA0OQ7ghLf3TLdpcFf4xf5Y6OKHbE3zi10NuLEth98+t7xR37nuwXkls2ku+zESidyUp0Pc0dgxAFSZjmpxRnfKPs1dgzrI6nfMnwf2/e2RJYtH/PjwEwQVlzL17bSyDYaTHOOTq0g/mtYgrDaoxShM65epoe9punDt07Gp0uEFs0wUdbAcpKrFlrAEbPk1gvQiW3SULbqVMlLyWT1hxG5pQwmZJhwhCqgdwFtopigWqt6r+khAhFnuf6OlpPS2ujEs+ns6PRXROosfYOBR+WNmnHfJIG8DXPi4XgOZ0+l7xrLwv2tdTqDIDTmu0wSI0HvUWC8hASP+4GGp6b/m4Q7fZPa2Am6Yrg46Ex3V9 X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PUZPR04MB6316.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1df7b470-8720-4bff-0fb3-08dacde6c2f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2022 06:40:22.2406 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 66c65d8a-9158-4521-a2d8-664963db48e4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: f0FTT3B2na1G5dTTgTeH69v2bFGhERnqIZdcxbug8+MnA315M8xCMXaK64onRMSUkj9zVvuzsIJop69yPumzDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR04MB4425 X-Proofpoint-GUID: j4_d0W4wZx7RT3iwQ8G0r2ikmBUE4NsY X-Proofpoint-ORIG-GUID: j4_d0W4wZx7RT3iwQ8G0r2ikmBUE4NsY X-Sony-Outbound-GUID: j4_d0W4wZx7RT3iwQ8G0r2ikmBUE4NsY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-24_04,2022-11-23_01,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750359068476951341?= X-GMAIL-MSGID: =?utf-8?q?1750359068476951341?= This patchset reduces the size of exfat_entry_set_cache and moves it from heap to stack. Changes for v2: * [1/5] [5/5] - Rename ES_*_ENTRY to ES_IDX_* - Fix ES_IDX_LAST_FILENAME() to return the index of the last filename entry - Add ES_ENTRY_NUM() MACRO Yuezhang Mo (5): exfat: reduce the size of exfat_entry_set_cache exfat: support dynamic allocate bh for exfat_entry_set_cache exfat: move exfat_entry_set_cache from heap to stack exfat: rename exfat_free_dentry_set() to exfat_put_dentry_set() exfat: replace magic numbers with Macros fs/exfat/dir.c | 70 ++++++++++++++++++++++++++------------------- fs/exfat/exfat_fs.h | 37 ++++++++++++++++++------ fs/exfat/inode.c | 13 ++++----- fs/exfat/namei.c | 11 ++++--- 4 files changed, 80 insertions(+), 51 deletions(-) Reviewed-by: Sungjong Seo