From patchwork Fri Dec 13 16:01:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13907412 Received: from outbound-ip191a.ess.barracuda.com (outbound-ip191a.ess.barracuda.com [209.222.82.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 259EE1422D4 for ; Fri, 13 Dec 2024 16:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734105728; cv=fail; b=ufaTRGAP83hFa6cn+cBIiiaOsl80JGOXUJtMko8fNPj3Kq1nuoCChEeFu/2kaUeMIdEQjk6VZE4yGmZC0cupes87B1jP/F36j0hD2jknB7D2Fz3r7d6yEgbSUwvxkdeADMOCWcWOC/rI6gU5aEUHwIY8d0EVAvo1Ild9VFKDwmc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734105728; c=relaxed/simple; bh=X6OIB2bYDd7oxNCztYJzfMCQe7eHrAwSQKRXsrPQ3aM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QL4uMfzYrzcIROZexh9mOM+sD97UhVYcjXReQmneAtbk51K/P2GV4cAyNNG3r6AuogjuOM4DFWGl7PB+Aewm+TlB+Awb6pAuh7P3YNv20xWiHniVmpC+QQW2fVtkgOCZhHtw8it5D19r+fgBPQpx+VEZ1u3ISHLYEPbJTZzjBv8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com; spf=pass smtp.mailfrom=ddn.com; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b=0raaWW5M; arc=fail smtp.client-ip=209.222.82.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ddn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b="0raaWW5M" Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by mx-outbound14-204.us-east-2a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Dec 2024 16:01:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WusVqiNbUpAvk0RTiCPJIYYKopXpyfpPeTpfiI6uBfSNJ2pu02xizqQMoCgDD8Cbhy8rkDX1LqqjdCFOuhXvvO76Yecg8CIggI7lKR1/Kn8nk7RgGa4/1vbLaUo35U3ovnoPAEtwLRkdecLCNFwsx7qS/TRDl1C9EoA5JFf0/BMD5aVbv5FH6E+W92Dut0FRsrrWz6CzF6UqgeI5ZhZYKg/k5c7jwr7f4352Rlzd6myE4c5GeO4VvGaF5Lbndx2IDcdbuG5lTQXcNa1/VorunuGiG0w45hntGGJMRtugaWSEzvPeV7cG4Ye3eB4LkfA5HuPDHxe3/RMRpY9K07oF1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=e5GgVXxbtgnZT6r6AEmIhQT7BL7NEhAkO/rs5iOHZgw=; b=zGWLCUSQKaybb3SeGOjtTThHCQ3seb3jmai/1k/9seuj5srF469HXECbrCFIPi+LnGpmcz3JxgrO6n+seK0u6g2qummCG8q487eVtcOIGuRMPaLdE6QKIsjCjKDLpQQUsqy87jc61tLv7/hiV57hYMGoCLvpffrFnRC9CnFGqGKwJlzkbXggQ5Xn54GglvHBBW/99ywU2EWsDX7tztK/QXgUlsu32G8C5HTchbA7P9rnEzOcscN/TZW6NefWUzzSuzYbtvj+YpKoWFA5plkbUs/HuMbE4Bh6ROJT+DqKv6ISTT6kNH5ACU0j6CFEdIJ6M5S5CVhgoiw2YqsRrjb+0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 50.222.100.11) smtp.rcpttodomain=ddn.com smtp.mailfrom=ddn.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ddn.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e5GgVXxbtgnZT6r6AEmIhQT7BL7NEhAkO/rs5iOHZgw=; b=0raaWW5Ma9e7JYISBllGIQhIRxaHbFHplT+PHMtLYcDE77UgkHqBb9bygWdm5eVdsqSfLWEMc0MQhvdI1Y6U2K+sndI7ET3+2gFFVolhrL1XEQlm97Ge3+kbtR+N+GJWUcVd++4zufTHBYT8QNMBm+VwjQfZKJ1RNZmkLEmKGkw= Received: from SJ0PR13CA0011.namprd13.prod.outlook.com (2603:10b6:a03:2c0::16) by PH7PR19MB6063.namprd19.prod.outlook.com (2603:10b6:510:1de::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Fri, 13 Dec 2024 16:01:44 +0000 Received: from MWH0EPF000971E7.namprd02.prod.outlook.com (2603:10b6:a03:2c0:cafe::bb) by SJ0PR13CA0011.outlook.office365.com (2603:10b6:a03:2c0::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8272.5 via Frontend Transport; Fri, 13 Dec 2024 16:01:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 50.222.100.11) smtp.mailfrom=ddn.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ddn.com; Received-SPF: Pass (protection.outlook.com: domain of ddn.com designates 50.222.100.11 as permitted sender) receiver=protection.outlook.com; client-ip=50.222.100.11; helo=uww-mrp-01.datadirectnet.com; pr=C Received: from uww-mrp-01.datadirectnet.com (50.222.100.11) by MWH0EPF000971E7.mail.protection.outlook.com (10.167.243.75) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.15 via Frontend Transport; Fri, 13 Dec 2024 16:01:44 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id 76C854A; Fri, 13 Dec 2024 16:01:43 +0000 (UTC) From: Bernd Schubert Date: Fri, 13 Dec 2024 17:01:40 +0100 Subject: [PATCH v2 2/2] fuse: Increase FUSE_NAME_MAX to PATH_MAX Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241213-fuse_name_max-limit-6-13-v2-2-39fec5253632@ddn.com> References: <20241213-fuse_name_max-limit-6-13-v2-0-39fec5253632@ddn.com> In-Reply-To: <20241213-fuse_name_max-limit-6-13-v2-0-39fec5253632@ddn.com> To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, Shachar Sharon , Jingbo Xu , Bernd Schubert X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734105701; l=1356; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=X6OIB2bYDd7oxNCztYJzfMCQe7eHrAwSQKRXsrPQ3aM=; b=OFx7d4QJB4ZvEUelY896yO1oW6mD0PaUWldOVqchVxpe1mYOpfkqjaQ4JxrEpapoZ3rV1Na2d mwSX0P47ss2B1sbQfXWXiVG4UNq3sdwR6TWiiepvazo+LXbl+ZePZPT X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E7:EE_|PH7PR19MB6063:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c127917-a025-4ec6-6e37-08dd1b8f70af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?XgYc2LronN8UB3fiaBiS4Kq4zvq3CvC?= =?utf-8?q?zVRTRA1LChjCeYii/Iqcfk8wjYafpgQypcm6QrzwfL79QFDY8xpzyi49pxetfS7bG?= =?utf-8?q?XaaDQZLZqFZqiBpfuU6MToFExsNECThfDqhLvqhVloHOulxOqkhFIu4DtClD5pvn1?= =?utf-8?q?zd6cOUGlRPd77FRiAoxiubVZD4L/kW+2wz9gVnGTKRTaT4lLXR3PRWJadJAJ/4NHA?= =?utf-8?q?xYTEkgFo6L2mL7DAVpPqd3o55GhB46QgdtpWEWvOBH4SrsVMtM5ynXQKwnvEwW1kq?= =?utf-8?q?K01+sN5bCsc4AlyOOSW2YO2f8BFo54vTK0/Js28oleAHVtLyZ8b9Bqvu6KdHU/ryu?= =?utf-8?q?MLuG5+Eos4KEu59fX5/guPxFRHZKPxt9KeL5fi1BOELmKVSbk8v6S05W2QsACd7uc?= =?utf-8?q?aBfHH03nz61Ai1LXQam2flf01clqU68QGkC6H7jWeJ4krHSDTmg75W0QiMN3Inn8l?= =?utf-8?q?MGag4pfoHm+q7CnPvpqRdjBhXZUYZJrnMXwR3tw4a6o1l6ipT0BPV4BQHUeHrvBzc?= =?utf-8?q?cWwzVRo1T2yLFIHPc1KI5yictysl1euzX61+yznVfxmM/x6/BhJVfuzurvbbAHFkE?= =?utf-8?q?meYv3udH2JAJUl+njwfCPtnp8vS1r2vA1IEZJ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.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: cDmY0DeCP0CGBiIS2qnfdBGG1EvdXl5uhXlD+UuqQJeihDSsS/EKuDOclP5WsCmaETXioEK+X2IPLLh8A8v+dTMgcVMtWyioVJF83B08iHwCaTsjaegA/4jl7UndCO9evtKGx+CEzK8iP2xeqqg02dxGW9idex/FFLk2n0EIUMMm9NgVsryKx0Sb4hiyaXXcadltOBA+GfQXllun6LovtfLVCL4hNePeGnqfHmtDHSOyOegCPEeexP0WXv0OcCSaykZgI0B94eAjebHx9m1rC0hvoGRdc89o+hQQrDL6s2zKwpwy83AueH62w7aGZbUIkgB+r9Yk8WH8b04HkbyOnf2yGJsqJsys1WxEzVuzXVJYpw5njO9HuO4LXe9R58c6ueTUAdpDdIDzegpS6ZJBXEHv8boLBx+k0T8L4VcKs9bZ5/3CbZX4z917hIfYwcX+XJ520BwnJect/pa9+ltYT8u4oicnCR4nhfY1i+gyPPxFaL7gKX2yMfeqLSLoS8UcUDSQ4SoindZzPCPxkWG8CBeqVybchQTh/BzLmOW61gyglMRu39/pHSlRQ2lXrQhO+aYNodQe4b5/bILbDUOvu6p1B0DxHmpe7p6V9nnczsRuAjvqMeVUCqMPPdIQyMh5CZsWjJFxgdVVFJ+1YnFDNw== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2024 16:01:44.0203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c127917-a025-4ec6-6e37-08dd1b8f70af X-MS-Exchange-CrossTenant-Id: 753b6e26-6fd3-43e6-8248-3f1735d59bb4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=753b6e26-6fd3-43e6-8248-3f1735d59bb4;Ip=[50.222.100.11];Helo=[uww-mrp-01.datadirectnet.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E7.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR19MB6063 X-BESS-ID: 1734105707-103788-13490-6909-1 X-BESS-VER: 2019.1_20241205.2350 X-BESS-Apparent-Source-IP: 104.47.59.170 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVobGRoZAVgZQ0CzFNDnNyMQkKd EwOS3NKNnQ0Ngw0cDcPMkkLSXJNClRqTYWAJz6aMFBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261086 [from cloudscan18-105.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Our file system has a translation capability for S3-to-posix. The current value of 1kiB is enough to cover S3 keys, but does not allow encoding of %xx escape characters. The limit is increased to (PATH_MAX - 1), as we need 3 x 1024 and that is close to PATH_MAX (4kB) already. -1 is used as the terminating null is not included in the length calculation. Testing large file names was hard with libfuse/example file systems, so I created a new memfs that does not have a 255 file name length limitation. https://github.com/libfuse/libfuse/pull/1077 Signed-off-by: Bernd Schubert Reviewed-by: Jingbo Xu --- fs/fuse/fuse_i.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 74744c6f286003251564d1235f4d2ca8654d661b..a47a0ba3ccad7d9cbf105fcae728712d5721850c 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -38,8 +38,8 @@ /** Bias for fi->writectr, meaning new writepages must not be sent */ #define FUSE_NOWRITE INT_MIN -/** It could be as large as PATH_MAX, but would that have any uses? */ -#define FUSE_NAME_MAX 1024 +/** Maximum length of a filename, not including terminating null */ +#define FUSE_NAME_MAX (PATH_MAX - 1) /** Number of dentries for each connection in the control filesystem */ #define FUSE_CTL_NUM_DENTRIES 5