Message ID | 20250123-fuse-uring-for-6-10-rfc4-v11-8-11e9cecf4cfb@ddn.com (mailing list archive) |
---|---|
State | New |
Headers | show
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 CE28820F971; Thu, 23 Jan 2025 14:51:40 +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=1737643911; cv=fail; b=YmOjeuO9emJcpjCuiyM9MCumzi2oaTD26Ve+bkI83olfrHZO/9Rhw5VYxRwYQuodDp5ud6BO8nWBIEzMYX1eIKGgH5ha7cYKEfnYFHIrXyc95+GwQvxJUSS1JGpqkCQJB4DXSiJS5evAxBiGSTwJpYIpHKxolMK8AXNKP2v4NOM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737643911; c=relaxed/simple; bh=NXZl+GygX3zSlvpFSX58oVOh7EcV3dfte05lWH9sgmo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZvCxClUt1uZg3dRMltn2T47H+Nbi2NsxiAPbs9uBDYdJjvMZFZm7pn3NCq+rJwkcoDgrTF8+6kGB68vrGMDNC+LWtgTCQH/6TtP6T9mPboILajuJIGZ+bx7+j71nseIsE0895sfZ48T9PhmQBvzzkg5V2oQDQr6MyA0tbLmwlKo= 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=BaCGiPxT; 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="BaCGiPxT" Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2044.outbound.protection.outlook.com [104.47.70.44]) by mx-outbound20-29.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Jan 2025 14:51:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VjKTbjNLIduvZWuIl0I5QdUAkOtzLolNGuz6hEVSvi8t532iFXvYitFvaVPP0iVvCtI7jWp+Q7cjkhmKbw5zSu/XsxNKkbK53g0npDLoin4La4FuoOglHoPjnKzrVcbBp5VJ0c8sSVd4FzuCBHxduav7uuwMAnRWcg9T+hLUf2XGOXuDdOc7o8345J4BWtBNmmX3K7YUfOmCeDv3V0NZMinhyZ/2xg9v5Uq0uXXl4fNp13sLGb3YqBBTN82i+T8kLQQ7AeHWx/WnAp4yg+l56IeOk3xmqo73WYsDeCcC2CHuLLUeo409WqNyChYbdnGHJit6NdMFC8dbtvzWVOaokA== 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=rdU8JhlrwpeChLQ7InT1cILLXjG3597xLtLscm3hkUw=; b=FXLCQxKtCEp1RgC6hD2bMnHwfrhgYcy3RKb3hAtgZnaWR1NOA/dYcXq8WDZWkTU3sSWgADpR8H3BKm/8K0CWqf9YQWYFVRLqR32AIRLFK4183v0FgKgOMFHXih0b3rJy67gwAclR6dNQZPLr6Y1fY70OZq5NAnwpAPENFmQbclhEg1N2u+OfDUbhFr4yC9rV6/qAnigLytBnevQ/UF0xo+sUCU05e6DQROdWhJswHP+Ja3W41kq47JgSWoGWPphrEUNEEEF59bA0ozJaYmGdA3BAQ4N0QK+ngoSIlz0OomhoKimsV3zPryjd4Gcta+3ijveDGKmWqOYDDZ89v7bQ1g== 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=rdU8JhlrwpeChLQ7InT1cILLXjG3597xLtLscm3hkUw=; b=BaCGiPxTzpDsP2asurpwtHuYK0f7Lv9J4j4gHD7jhtjfm/9lwpIJcQ9uKFlsXVIuyyG/VlMXeYHWYiEjXHjOAen5KXae3AXDt/1+vWNp6sULtK5ZB1tDxFlHx9S+iqcUSvFKTY0CPIAzgxyeetcljOOWAttVuqO8nLIkLRkM2F4= Received: from SA9PR10CA0004.namprd10.prod.outlook.com (2603:10b6:806:a7::9) by IA0PR19MB7653.namprd19.prod.outlook.com (2603:10b6:208:404::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.20; Thu, 23 Jan 2025 14:51:21 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:a7:cafe::cd) by SA9PR10CA0004.outlook.office365.com (2603:10b6:806:a7::9) 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:21 +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 SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) 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:20 +0000 Received: from localhost (unknown [10.68.0.8]) by uww-mrp-01.datadirectnet.com (Postfix) with ESMTP id EF09D58; Thu, 23 Jan 2025 14:51:19 +0000 (UTC) From: Bernd Schubert <bschubert@ddn.com> Date: Thu, 23 Jan 2025 15:51:07 +0100 Subject: [PATCH v11 08/18] fuse: Add fuse-io-uring handling into fuse_copy Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: <linux-fsdevel.vger.kernel.org> List-Subscribe: <mailto:linux-fsdevel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-fsdevel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250123-fuse-uring-for-6-10-rfc4-v11-8-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 <miklos@szeredi.hu> Cc: Jens Axboe <axboe@kernel.dk>, Pavel Begunkov <asml.silence@gmail.com>, linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Joanne Koong <joannelkoong@gmail.com>, Josef Bacik <josef@toxicpanda.com>, Amir Goldstein <amir73il@gmail.com>, Ming Lei <tom.leiming@gmail.com>, David Wei <dw@davidwei.uk>, bernd@bsbernd.com, Luis Henriques <luis@igalia.com>, Dan Carpenter <dan.carpenter@linaro.org>, Bernd Schubert <bschubert@ddn.com>, Miklos Szeredi <mszeredi@redhat.com> X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737643871; l=1834; i=bschubert@ddn.com; s=20240529; h=from:subject:message-id; bh=NXZl+GygX3zSlvpFSX58oVOh7EcV3dfte05lWH9sgmo=; b=pRv1iOxHRc8hadrdtLkP3YoTjRo8ZryTyKsiuANahe9uD139rDkps4NGo52/2ILrAjVtwTE4q IPC5xOc4R/AC4U1c/+t08AIHrDsHYW/DykiZ8G2uPZNxoHOjQl5y1Zk X-Developer-Key: i=bschubert@ddn.com; a=ed25519; pk=EZVU4bq64+flgoWFCVQoj0URAs3Urjno+1fIq9ZJx8Y= X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|IA0PR19MB7653:EE_ X-MS-Office365-Filtering-Correlation-Id: 8540f14b-6996-48a2-5c19-08dd3bbd6656 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?zADz4Pvns7+lbSwfo0r+kcti5FTV0IO?= =?utf-8?q?t10rv9f2fXS+UVzOnIA8Pteqlgfrj3duxJeSFSzNAYhOKNk55fZPdfR1bKnsxnLvq?= =?utf-8?q?Pz7fn73iP4io2oLgKDoaGGSik9PyGeicC3dJwYHI+RHFF2Uz4P0CtRRC7cr0UBsDK?= =?utf-8?q?m6YZC8zhdfK7axpG+hRHdgc6Wm99jwxFvPzX+XWJWrL23miPtKxcEqpMz1CqSUYU+?= =?utf-8?q?PnDHAKbc+KtFCsUSC0M0DwyG0Sbq0h7CHU7guqXSWtuF8O6JsSFkGoLilR+lOZ1o0?= =?utf-8?q?r51QPf+hgYCiOXFn8u1QsGVV7no3GohOgl3TTj9QIDNVjhin1LQvzT/zMqg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?q?Rdt4aa8O9QmoK6Kcv7r6cnGFBmKFKB9zSLJbUN8Q6FBNO0tr3Xq6Xa9Blx0PH6VBg?= =?utf-8?q?TMnXb1464P3Yl20lqn/56QhAxzuTZ+EY7/8uGbMYPk6Du+Tx/qK3En0U0ULqW0SN2?= =?utf-8?q?48G5zVnpdZEdWTil5TpxVPu2kbD6DBIPAsmkzVxOPnszbp+NVNgdKX3h12kpUyvSV?= =?utf-8?q?xvlHLB6ev+SDMR434V0LWwa9YKVdr9xNKAayd2Vmli4uQ1emnqZ7+s=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)(36860700013)(82310400026)(1800799024)(7416014)(376014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: POpvlF4gHB/ffajc0alZ5Ze5rcP/6ebNJ+vivmdEfspLriG5nKtHT+8bh8y3bOMwzeJYdNxPXRIopN2dNq/rlnhGfOlNCdFwtYv37lJ0vCCV058XTqfxxlvQErYLKAsTlEkg8rDWYoPq6d3YDnhIIVRYeuYJ06dX1MfU2RIVFzPslr+RzUISaEOx9vrLiVsC36vkt0ZufmVsHsbzC1bKz+KaH4dU1/4F4q1izZBNx+3EkheLVwPiae82MFcyXaniy2WdnFyq9Uf7eoUmQJMkjcdsI7kGxcE07WOUIO6/GKIKwithxCO+yavqZwupOqSE9+oMKbB2VkH1cG1r23kwi1M4ZozjXa9pA9oDSN/4VpTNybfb/8apCjbJxTMJx8rE+OYnm7o4yw0RFcSP3yob0bL6PGyX0nIMbxYpkJZK7FbsC6WOek63kS2MqvFZ5G0x0yqAIRrU6bohoipEdIFoGn1Bc/QTiJcznVT2V3UpQ551YSx7tgX/Lm9EgVIjgP/qAA9k72Qla5oEkuMv0+9QFwo4nCj2g7M+3k1wOP0vlh9PARuNgwT8rmimnq38qA+SusrDwXXGbesCk/TCMp3l7o2wlHi89M9GR1sUkwDV8jabkiC6J+dqaHpjk39L+R89YyxeGyMO1lV8PPgMMhMisg== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2025 14:51:20.7490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8540f14b-6996-48a2-5c19-08dd3bbd6656 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: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR19MB7653 X-BESS-ID: 1737643885-105149-13395-5958-1 X-BESS-VER: 2019.1_20250122.1822 X-BESS-Apparent-Source-IP: 104.47.70.44 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVobm5mZAVgZQMMXEyNjE3MI0OS 3REEgbJ6VZmKQmmSWaGqVYGicbpyrVxgIA1hau40EAAAA= X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.262003 [from cloudscan16-40.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 |
Series |
fuse: fuse-over-io-uring
|
expand
|
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 6ee7e28a84c80a3e7c8dc933986c0388371ff6cd..8b03a540e151daa1f62986aa79030e9e7a456059 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -786,6 +786,9 @@ static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) *size -= ncpy; cs->len -= ncpy; cs->offset += ncpy; + if (cs->is_uring) + cs->ring.copied_sz += ncpy; + return ncpy; } @@ -1922,7 +1925,14 @@ static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique) int fuse_copy_out_args(struct fuse_copy_state *cs, struct fuse_args *args, unsigned nbytes) { - unsigned reqsize = sizeof(struct fuse_out_header); + + unsigned int reqsize = 0; + + /* + * Uring has all headers separated from args - args is payload only + */ + if (!cs->is_uring) + reqsize = sizeof(struct fuse_out_header); reqsize += fuse_len_args(args->out_numargs, args->out_args); diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h index 21eb1bdb492d04f0a406d25bb8d300b34244dce2..4a8a4feb2df53fb84938a6711e6bcfd0f1b9f615 100644 --- a/fs/fuse/fuse_dev_i.h +++ b/fs/fuse/fuse_dev_i.h @@ -27,6 +27,10 @@ struct fuse_copy_state { unsigned int len; unsigned int offset; unsigned int move_pages:1; + unsigned int is_uring:1; + struct { + unsigned int copied_sz; /* copied size into the user buffer */ + } ring; }; static inline struct fuse_dev *fuse_get_dev(struct file *file)