From patchwork Thu Jan 23 14:51:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 13948331 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 68A7C38B; Thu, 23 Jan 2025 14:51:24 +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=1737643897; cv=fail; b=UivoJMb6L2a99uThTWo/4Hc1LwSO0MaaW3o4EEFuhAb2x8Nz7OfoVtoT/iukDieOQmhj6NgD2bhQuEHqn3UqCNP4dbDekh8aYBwUIZhQOKqhWs8VMBe3dFx89/8+ky2NDXZxGVfeDJVJbRAxA0jppDsMyc2DBNUvAN/iYcXDWko= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737643897; c=relaxed/simple; bh=ELv4vSTFz4Kcn3bHANr7CBpZcX2A/Icg2hIwG22ixq8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VVu6wWDBk02rCMRktIdRH1CdoebXH9OOBVCnawhMtkMeYowYPnEMjhNATtMtawbbxrQbysCefZYqgSQKYnmUH+ZLiCDMQc9LrNY6FiwrWrMWLy9NHxBakhJRUDINz2a8oJEc54hpAKUDVI3KPMqJ8dZclpm3bpSxNEEqoG+XsHw= 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=nq8OH/Ti; 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="nq8OH/Ti" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2049.outbound.protection.outlook.com [104.47.55.49]) by mx-outbound46-42.us-east-2c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Jan 2025 14:51:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mu0vRIcfk70dXb63kSj88akvzu5RaL0MIL1MOc0GBTrbfWSQ2sd43/Mh6qSunCXHTVvIpJwfLeGIDKhXpidpEsyVVMD1vPFWc8Mvtq4YGQpVtgqvAx7mfxuYospNq9CE9/QDnCYwVhvqiOKJxBQ49xMulqlbn1BdEGe3ZDGImRPQbuutEoO0jVds5JWQ3DvItUEpCDtsRgEBtOD+p9reB8KtTQsE8O4RWfXMIaVGseDjwnnkqsCvzlJXJRPue0vr09CP+VHpjw6UQVGY52XqOQOTobxDpSNTEYHHvaGiVquromuASvknTWXvWUDytNPJSIW7pj5jdAyBsuusucm3RA== 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=iGELuObFK/+DdXqUXO2N8sJPzYyf9lE/8hbC0uxMblI=; b=YND9g0jVXtORmatihS8Qry7r3f14jprPIU+3Sceif/3HWp+dlVnei0tcVY5Oamzi9Lq6zCtOiSvFGxqTilu4yr9Fx5rXfGbe+A0yS5V4Vq758fd9J3OJjmruRFf1Cv8FQIRG75RIYR1gAEtThM9XSaR8RHVblAcpOVlQMogwO0CHmRDK85C/arlZDflDZyBeaVD2mjceDPUOBTsJI70qSVBunKZl0mkYYDDyZOXsOAVh1P1KuGEUMBVpcD+wu0hJR60tpc5c6sDe96CAPGiuObsER0wvOwe7IU35XSW8XVSoNEL/OySZL7kdZUx7ab40NKvvvQr0ZgWvfbsOcmz5TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 50.222.100.11) smtp.rcpttodomain=bsbernd.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=iGELuObFK/+DdXqUXO2N8sJPzYyf9lE/8hbC0uxMblI=; b=nq8OH/TiPjJ+HhtrxIaQ4R1ZbGaTKHVLsJxvkw4q+PHgh+YIPx7tFv/106twWQUexQoYrI7uPLY7PZJ5DdlRJWYwvm+eSJQiAZCAhTFRKkqqJ3ICeDCIjfdJ14h23B8i+f1eirpmRLnUfPZEMRiE4mUcF4EWFCBi2VIAy4ENn9g= Received: from CH2PR12CA0001.namprd12.prod.outlook.com (2603:10b6:610:57::11) by CH4PR19MB8769.namprd19.prod.outlook.com (2603:10b6:610:23e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Thu, 23 Jan 2025 14:51:14 +0000 Received: from CH1PEPF0000AD82.namprd04.prod.outlook.com (2603:10b6:610:57:cafe::7f) by CH2PR12CA0001.outlook.office365.com (2603:10b6:610:57::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.18 via Frontend Transport; Thu, 23 Jan 2025 14:51:14 +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 CH1PEPF0000AD82.mail.protection.outlook.com (10.167.244.91) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.8 via Frontend Transport; Thu, 23 Jan 2025 14:51:13 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id 2B3E780; Thu, 23 Jan 2025 14:51:13 +0000 (UTC) From: Bernd Schubert Date: Thu, 23 Jan 2025 15:51:00 +0100 Subject: [PATCH v11 01/18] fuse: rename to fuse_dev_end_requests and make non-static Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250123-fuse-uring-for-6-10-rfc4-v11-1-11e9cecf4cfb@ddn.com> References: <20250123-fuse-uring-for-6-10-rfc4-v11-0-11e9cecf4cfb@ddn.com> In-Reply-To: <20250123-fuse-uring-for-6-10-rfc4-v11-0-11e9cecf4cfb@ddn.com> To: Miklos Szeredi Cc: Jens Axboe , Pavel Begunkov , linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Joanne Koong , Josef Bacik , Amir Goldstein , Ming Lei , David Wei , bernd@bsbernd.com, Luis Henriques , Dan Carpenter , Bernd Schubert , Miklos Szeredi X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737643871; l=2834; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=ELv4vSTFz4Kcn3bHANr7CBpZcX2A/Icg2hIwG22ixq8=; b=5BzHXF/Zv+Thzn/80JFZi/sj6aGZSowx/42B6pD42AwyXOOH8wiuQ05zZP5dfs6lT+uC5APHe 65ulp+YDLGfD71n/F9jQQIMn3fzP8Ripf/5S3if5Jk5og/F37Mr14ia X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD82:EE_|CH4PR19MB8769:EE_ X-MS-Office365-Filtering-Correlation-Id: 91c5cb5c-13f3-4ebe-bb4c-08dd3bbd6240 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?MKk2tK+rJ5QuQgAaQ7a2qNWcVpjva+H?= =?utf-8?q?ATeSXxAx/wEs+UbYbgN50Bfoht8cIP2abBYzCZXGYZfoBMSl9gAcGoNf6IqA9yiT5?= =?utf-8?q?ZiSHlSwBY8QyFVJuYe6D4r04pL2FyX++QoxDu1jxkBbapqTpQQvTTelcO+tHqj4R3?= =?utf-8?q?llv6vxQEV/JxVLxSM/A3LmxctCQPtJ4ap2atzo2O3M+tScBLZ826RMdU0mDPJCSj0?= =?utf-8?q?GuqJY9vfZTfQGs+o7H1icJpZY+isuP1Jgg0j1/hO+o8pflSiEhZm3S2mBQg/FLgYJ?= =?utf-8?q?CPfHbFREPYaoqS+4K8TkRUKoHl2+cEmUn11bhuou1PLiHIi1bQqv41rmJiKKOAako?= =?utf-8?q?mGtPKJ3OzKgfw4iQgVpA4F7nDCE15nlPqI9N4WXAdZSyEQut38AHibEppf/vv4Q/A?= =?utf-8?q?dSTkDDdT66LPR7wYBSFGasgRgZFeoBgdFFE8DZMeVvBfoXkGWKfOPEJrtk6na6AEj?= =?utf-8?q?qpxoVCI0RbZEMSDkCHELoLMuK76jcU7WA6/aVe3oQ/rsMw8o1b6ekGQV9uTUt9F9U?= =?utf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MrV8+3pQON8y4G6ZPNCX2B+uwcPQ=3D=3D?= X-Forefront-Antispam-Report: CIP:50.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)(376014)(7416014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: M7ys4QPtXNlWuclnVX0SB5sgh8e17BPr4vUR3jAFLERqXvLDUF0+lKvuTxzzKcUfwDxovT95z53GcWsSZbUMg8sC773KTZUsIYDpcS8xbJfjtWH1ISkoYwWf9BB5OyS0xy/5bwiAr5yN21dC4r2dZISPWuMlOlRTcG5On2IgfFOVxjkIYtCxI6bYLdWH5B6g2j0Ov6yZvIEknA59fySTfXa0a9QcQNUqzZzpcxYwz+FdUvn0Q9a3qv/ppRexpb/RJNK7RyVMADP4NH/6Ak+L1Y/owESToQmivddLx4nLLmmzsj3YEA8c7pukCMRO6+7056YhUfFAgbAMM4Ix1/7vnpBNLe1i8mNFG9jncRQC9Dtl+y0/zRkgXFUgEUhjCKYHVs2mNhErh9SuSiboCkGSYEm6Yfm9SVFO759GjS7dzauITJotT6gMpwf28rvMz7iC7M4SeW02j3Q/Hh+3JDZC7GJXkreRQFDbsKK3d0LOWjdjWhkgwFYOaBEQq5q2HC1B/x2yGS8k+uh43CcJOe8HQA+bx2DGnfw08gkBev+e2MhfBtnq8L+TYPJ2O+6ze2Uil5gB4uj0ynoxrzKodyNzel5/AbJ/6d748VYhqzAidTSGbo2eXJiIuoW9aWw7JjWjiLTrMCIR8HxBLWc0ALx1WA== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2025 14:51:13.8808 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91c5cb5c-13f3-4ebe-bb4c-08dd3bbd6240 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: CH1PEPF0000AD82.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH4PR19MB8769 X-BESS-ID: 1737643877-111818-13400-6438-1 X-BESS-VER: 2019.1_20250122.1822 X-BESS-Apparent-Source-IP: 104.47.55.49 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkbmJkZAVgZQMM0gOSkx2djCyM DAIinJxCLNPNUsKdnQzMQ4McUy1chEqTYWAEbCYh1BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.262002 [from cloudscan18-232.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 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 Reviewed-by: Joanne Koong Signed-off-by: Miklos Szeredi --- fs/fuse/dev.c | 11 +++++------ fs/fuse/fuse_dev_i.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 27ccae63495d14ea339aa6c8da63d0ac44fc8885..757f2c797d68aa217c0e120f6f16e4a24808ecae 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 @@ -34,8 +35,6 @@ MODULE_ALIAS("devname:fuse"); static struct kmem_cache *fuse_req_cachep; -static void end_requests(struct list_head *head); - static struct fuse_dev *fuse_get_dev(struct file *file) { /* @@ -1885,7 +1884,7 @@ static void fuse_resend(struct fuse_conn *fc) spin_unlock(&fiq->lock); list_for_each_entry(req, &to_queue, list) clear_bit(FR_PENDING, &req->flags); - end_requests(&to_queue); + fuse_dev_end_requests(&to_queue); return; } /* iq and pq requests are both oldest to newest */ @@ -2204,7 +2203,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; @@ -2307,7 +2306,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); } @@ -2337,7 +2336,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 0000000000000000000000000000000000000000..4fcff2223fa60fbfb844a3f8e1252a523c4c01af --- /dev/null +++ b/fs/fuse/fuse_dev_i.h @@ -0,0 +1,14 @@ +/* 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 +