From patchwork Sun Sep 1 13:36:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13786484 Received: from outbound-ip168b.ess.barracuda.com (outbound-ip168b.ess.barracuda.com [209.222.82.102]) (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 4B9CF14A4FF for ; Sun, 1 Sep 2024 14:10:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.102 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199824; cv=fail; b=o/sJAcmBwi7bl8rmiuEgUuomtQCORxpLjmVXAKba+ySW6Gk8sZt0g9kYnlp3hzf8cDFv12QOWiO0y+NgwM40Pa1AQWPpHzSs+DzyZIb/8yXh0BJBd1j3+q7SO9zJSCdJiW3Pl42O0G4HFoGevSed/On4jwoA1cEKedz3tn6Rfuc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199824; c=relaxed/simple; bh=xGBbWgo2hG/E1txkE9HfWsjbQKcS3FLe2casQepXLZ4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l2PXhNRbhpcpF0Ek8KJvkZYkQwmwx2PImosp36zNk+YzI9EBBe6WDCw+q6ecj257Fwxpdxww2GGOPHJs7WHxvZsoB3ymXxIjmkVWnAc4HNZ9hM1LEswwohYXoww0mv9k5EaTzMT366QPMDW0hSigr6jLZmPYxtcNTyEFR5B3VEA= 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=p8isiqkq; arc=fail smtp.client-ip=209.222.82.102 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="p8isiqkq" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by mx-outbound20-213.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 01 Sep 2024 14:10:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dr9jVacMTY0Q915L3iVmnWdc93sf4vENJwm+srspocrcy5XO6AWbQF4Gu1C/kxehYk/Gk0v2JgNMQYqJ/d2giMS0Hr0Tcj4hX5uRpUrxpyDAj0ywpIk7fnMqCeW53l//abb5UCt2rPH1exucPZ7JkCZkTqUya4Mb5QfBF+mfh+wNerIIbe6xURdI2WlXpw2zwGdoJalASUo6fn2oWvb9nmLfLDaBKuDqWY7u853qsFeV9eX+5G3/iQs8q7+PqyB5IRBoFs7Qb1HPFyn5yNB5YHgDrXWXBbQs0Z5Fz36uWkD81GeszRQ/u3y7+0EjLlfaUd5dPfJqv3caREq+x49Srg== 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=EB2+Qa7oMm5M7WYKiLV8TBlwCE4F85ZJ3yzFcpM2wd4=; b=pG6YoiUAeWBuf7HOijLh76aOf7bnA9Q2B8cHxHC5ro+d+6YSMoye1ciWDZz41aGAGlvZ6FSD6nHdInxy/XnvvARxLcbXVtrIz9rqEAz90E7PeTKyXqpxtiV3bgITgjJlw+gNoesfhlKkVr8fODXnWa2xrYv569+oZkD58B4Re/RNOZsUxHW8oCRt2mv6T1XudK/3JE/nKi31Q/y+v6jVrSkZPXD5taz5JdcRXvCxfuQIm7Q+UepKrAgZKAVkP+89dDR4clsBbCJMbK08lBBd2ux36Ni7t0rWFwqIeXyVXiy6DOfj6fkfFqxWS9Tt/mev3l5yTFtdLJXIe2ECEG9JYQ== 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=EB2+Qa7oMm5M7WYKiLV8TBlwCE4F85ZJ3yzFcpM2wd4=; b=p8isiqkqcmUtJzhIDY9RZRw/NTFtR6YSdnxxLrEmr2fw1/sVWHwgjnhvTfEE24bCLCcJaSt82/YL1DXx15nG+VRVSXeqMSBQmnEC20Q34Pm5SaAULpVYRKop/dtwCWvDhyHOIt59sHMFVJCpyAjo2Fjpy74Amzl4BhsxOGX1XfE= Received: from SA9PR13CA0023.namprd13.prod.outlook.com (2603:10b6:806:21::28) by MN0PR19MB5970.namprd19.prod.outlook.com (2603:10b6:208:37e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.23; Sun, 1 Sep 2024 13:36:59 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:21:cafe::31) by SA9PR13CA0023.outlook.office365.com (2603:10b6:806:21::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.23 via Frontend Transport; Sun, 1 Sep 2024 13:36:59 +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 SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Sun, 1 Sep 2024 13:36:59 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id A4236D0; Sun, 1 Sep 2024 13:36:58 +0000 (UTC) From: Bernd Schubert Date: Sun, 01 Sep 2024 15:36:55 +0200 Subject: [PATCH RFC v3 01/17] fuse: rename to fuse_dev_end_requests and make non-static Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240901-b4-fuse-uring-rfcv3-without-mmap-v3-1-9207f7391444@ddn.com> References: <20240901-b4-fuse-uring-rfcv3-without-mmap-v3-0-9207f7391444@ddn.com> In-Reply-To: <20240901-b4-fuse-uring-rfcv3-without-mmap-v3-0-9207f7391444@ddn.com> To: Miklos Szeredi , Jens Axboe , Pavel Begunkov , bernd@fastmail.fm Cc: linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Joanne Koong , Josef Bacik , Amir Goldstein , Bernd Schubert X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1725197817; l=2071; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=xGBbWgo2hG/E1txkE9HfWsjbQKcS3FLe2casQepXLZ4=; b=mpDC0wEjjky3LWI4I97s9WlGciUPSc8VEiW4BEW7ZxxvWuoyU73TDMeRjo4ANaTwn6sMrjyQu /JS5MHeZHlkDDPq16SQKdZsq/UjCXi4RQ4Wj6FMtVa6//j9isJwi69m X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636A:EE_|MN0PR19MB5970:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ce9707e-d654-4dc0-b470-08dcca8b27aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?L7PqteuyYraiJRcgctJRYt3gM2u25As?= =?utf-8?q?ol1wxkYQesg2Az1weKJskrYuYx1aRByFS4mJnD6NqCzx57U1t4wFXUTO5hJ4CcEEr?= =?utf-8?q?mZXjtfnETorxG8C2+berttdFnv/jEPOdqaVOngEHhMTjGFjz+Dk8Jp55NMTdTnagr?= =?utf-8?q?xNBZwYNROoNxqmL9lFtJPFWcNdaArhRdz+BuJXANqi2k183jtRmnERd7V7cEMR+U+?= =?utf-8?q?mBXWCdD1nRFIKqtSseA2KmrtuGh1M6qAnUnrIj7GQ4ghnO6qyfvRTpqu20qB5Ckbr?= =?utf-8?q?iwtCkkiHIdMT0COT2HTIRCzd/xj1TvpmRfOrNt6kfTAmqjeGCeMBYmf22Y6eKPElV?= =?utf-8?q?h+mcuRhIAiVifwrmmXseJQfFwHXD6FYTkyv98Og4kyP1DkoxiBt1M7iBk9htHBjFr?= =?utf-8?q?B5yw0oDnmvZUxMoN0G+U9azBHWHfKn3XpWZ/1nu8j7QX5WfHW0VVdLncllqshPe9e?= =?utf-8?q?M4riUMOmRPeZzldv3z0pd1DEWMOkPRNXqeSphBNkgMxb44D9FkIEhBi1oc23s4bsd?= =?utf-8?q?bBUnI2vuYrq5Z51aSb6M/fbSSOetmtQMfv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222.100.11;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:uww-mrp-01.datadirectnet.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: nGtuNHZ4xPxSa7uXAWkQy5o7SHTIT+aqUhvwILPOnCR0T/2MJ0DEYIFDOH4mPqU0UA36lopZNTZ2yArbMlJbsmTGzNEqU1tCXMvkU8MJYze3AwhUIRLVrawqCo+gRSrWUeygZ1Ebqz7g8qys1PZeNMRDRK6VzC1smp5PWyfBGzmpD6BK9+vmnq17BQ5TqtXRwI/p/kwZpA22r439bSIeRdQ6Bc3CfVSh4o0W+rgh2cg9MpFqAl4inVamHq3cjWjCdoeaHL+0Qw6yiZvozbr9JivE+WLZEfzyGGghMss+6jnLjJ5CAwKwngQo20Kj/p+WkbzIYofvlDTyttiIWEiuM+hYUhJz1evBYXME//Zq881UyA6RavluQwsl5W7KM9YpRnLxoiw/3U2Apy0Km47063ce8rhKDJnZeIjYuL5ZD/+7Hr/+N4n9qEtPsRv1agZFlIrO1eWxUO+XGSPJ5M9u/G6mEmg/JiYdg/FazdWNTDcPmD058C4v3lmDGIuONMuPzEtXCUUqdzNwHbIB7pT+WCwA9c484ct3lltUwXfSbbVaz8IYUupOJiI7PctEkOTUOA8hWXBqi9GwVlo55oGaLxf0KMn/C9CimkyhGTqsm3pCIvQ9gRhL/0EMDJwCLeD6+8TgWycnSnIAilmYLS351A== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2024 13:36:59.3750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ce9707e-d654-4dc0-b470-08dcca8b27aa 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: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR19MB5970 X-OriginatorOrg: ddn.com X-BESS-ID: 1725199820-105333-12934-692-1 X-BESS-VER: 2019.1_20240829.0001 X-BESS-Apparent-Source-IP: 104.47.58.171 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoaWlhZAVgZQMMk0Odk4MdE82S wt2cA4Mc0s2SDZyNwIyEo0TjRKTVWqjQUA2BoRZUEAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258744 [from cloudscan19-239.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_MISMATCH_TO X-BESS-BRTS-Status: 1 This function is needed by fuse_uring.c to clean ring queues, so make it non static. Especially in non-static mode the function name 'end_requests' should be prefixed with fuse_ Signed-off-by: Bernd Schubert Reviewed-by: Josef Bacik --- fs/fuse/dev.c | 7 ++++--- fs/fuse/fuse_dev_i.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 9eb191b5c4de..74cb9ae90052 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -7,6 +7,7 @@ */ #include "fuse_i.h" +#include "fuse_dev_i.h" #include #include @@ -2136,7 +2137,7 @@ static __poll_t fuse_dev_poll(struct file *file, poll_table *wait) } /* Abort all requests on the given list (pending or processing) */ -static void end_requests(struct list_head *head) +void fuse_dev_end_requests(struct list_head *head) { while (!list_empty(head)) { struct fuse_req *req; @@ -2239,7 +2240,7 @@ void fuse_abort_conn(struct fuse_conn *fc) wake_up_all(&fc->blocked_waitq); spin_unlock(&fc->lock); - end_requests(&to_end); + fuse_dev_end_requests(&to_end); } else { spin_unlock(&fc->lock); } @@ -2269,7 +2270,7 @@ int fuse_dev_release(struct inode *inode, struct file *file) list_splice_init(&fpq->processing[i], &to_end); spin_unlock(&fpq->lock); - end_requests(&to_end); + fuse_dev_end_requests(&to_end); /* Are we the last open device? */ if (atomic_dec_and_test(&fc->dev_count)) { diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h new file mode 100644 index 000000000000..5a1b8a2775d8 --- /dev/null +++ b/fs/fuse/fuse_dev_i.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * FUSE: Filesystem in Userspace + * Copyright (C) 2001-2008 Miklos Szeredi + */ +#ifndef _FS_FUSE_DEV_I_H +#define _FS_FUSE_DEV_I_H + +#include + +void fuse_dev_end_requests(struct list_head *head); + +#endif + +