Message ID | 20231207212206.1379128-9-dhowells@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E233C10DCE for <linux-mm@archiver.kernel.org>; Thu, 7 Dec 2023 21:22:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9792E6B008C; Thu, 7 Dec 2023 16:22:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 929D36B0092; Thu, 7 Dec 2023 16:22:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F1246B0093; Thu, 7 Dec 2023 16:22:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6E1DD6B008C for <linux-mm@kvack.org>; Thu, 7 Dec 2023 16:22:46 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 42B7F1C0881 for <linux-mm@kvack.org>; Thu, 7 Dec 2023 21:22:46 +0000 (UTC) X-FDA: 81541296732.11.F61E77E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 87439C000F for <linux-mm@kvack.org>; Thu, 7 Dec 2023 21:22:44 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iPU5MRKn; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701984164; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=shWxGi+94hUVdbxc3FCgiKxDR0g1X33mrWTu84CcD7w=; b=MrjQ1KRqqdnMprzLvnkoicb9w8VjHsDoxipkFNdiJxupfUd14Bzd7/myfXp2sTaVlKzEMw PmkFxROZVPkpeTr5sNbYtjniVjHzZLpe3ANiboRdtY20JYAxNURXVSaPT6fvbDGuy2btfc I5G/w9dAfYFe0RpN/G2K+JXrSpZB3Qg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701984164; a=rsa-sha256; cv=none; b=hzpPigwvZg/c/XIPqTP/FDy85gcKOd+8ktfxAUub1j56H7Aa8PshmhfVl+QqEvRjUKBMLQ lwTcTdaYKcv4TMZnr+C+6+r7bknubGm6zdhz5kVMy4kDjGVZS6eV79g163I3ZMgSDZiDED GKcEcO6pHbXiCTwzfWBPgmxUVNhnwYA= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=iPU5MRKn; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701984163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=shWxGi+94hUVdbxc3FCgiKxDR0g1X33mrWTu84CcD7w=; b=iPU5MRKnfXcZ8Ffid903lzmDEBmF/RmuzOi4hENhN2txhJP3rJ3KD4wsuMSYB5u1VNXHpF ZYAxuh6CLqKjEMtxvdjGOh5aJFMkEWhQR4Gf2NDEkMXtGKK08FU77PRfu/z/dtjr7QYDPr V+kZ4fR/yEwkrptiUPJcAcHnV30Z6kU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-x7mvjHNlOQiZNHCPmJ_SPg-1; Thu, 07 Dec 2023 16:22:39 -0500 X-MC-Unique: x7mvjHNlOQiZNHCPmJ_SPg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7E5F0185A787; Thu, 7 Dec 2023 21:22:38 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id E42301C060AF; Thu, 7 Dec 2023 21:22:35 +0000 (UTC) From: David Howells <dhowells@redhat.com> To: Jeff Layton <jlayton@kernel.org>, Steve French <smfrench@gmail.com> Cc: David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, Marc Dionne <marc.dionne@auristor.com>, Paulo Alcantara <pc@manguebit.com>, Shyam Prasad N <sprasad@microsoft.com>, Tom Talpey <tom@talpey.com>, Dominique Martinet <asmadeus@codewreck.org>, Eric Van Hensbergen <ericvh@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, Christian Brauner <christian@brauner.io>, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 08/59] netfs: Add a ->free_subrequest() op Date: Thu, 7 Dec 2023 21:21:15 +0000 Message-ID: <20231207212206.1379128-9-dhowells@redhat.com> In-Reply-To: <20231207212206.1379128-1-dhowells@redhat.com> References: <20231207212206.1379128-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Stat-Signature: hfy7n4k3xfhb7gngs9futzghxp583q7c X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 87439C000F X-Rspam-User: X-HE-Tag: 1701984164-624345 X-HE-Meta: U2FsdGVkX19nO0/56vSM2UdSBg8COjJhiO8BtfbimqwaExJKrND6cK8Xvy/ZDmVXWidJi/imGUWVLc4nUNHxmx1eh4XePBn3Guqj/JrPBo0H3Q4amM5o1tgR8AlAG7Pts5GwLcpCTuAsDPB4O5fafNeBMuJKEckfE8aJND6q67HyJyUWYZwiSADHZBGy1ozy/tG5yCR/EPzE8q/DrA+HEgkWH9hNS29NLlw4sCRRR1gVUmdGxj5RetV0bpJBy5NzRKORFGAwArVDFVq5t49J0iUfhAKhXXS5nKgFQx9hjhVGTaisRoIuA1GdAcf4uzaPiLI/wi33sgM+3g5aXLCLY3Tu30f8cQ+6mxBY9fI9VH8OQpJst4UyN5/JKIebOu/iqtbWBwLoWt7/WISZN1uWAa36dgGLhq/7QJf8Z9DxNmjABrbCk03bPYZo98X8v1PtyPsvCGzbEkzOqFHHxuICKpflNZQAp7s27f8mQYI0LimyWas7YjcNiRzvT7/Oa3yV1VDu7+vr+qe6JO/VdksYQoXVGV0c3td8mN/8ti0mkqfrm3PdM3feubCskVG2LoTcTlU+b7Ifh7Ib78lNCUOJkNxq9iRPYlo5aK2ESIXqAvkAZpkxH1EVdFNONsH1gQ7ASi4JBD83Fm82UfH3edjeEiQeq7NC8Gd0+mtEiDUk5MU2ktDpaVQQuF+vi5lQxSGoZ2Dor2ZxUB6cS75Z0G+XQ29IOC/p6R/ZwDlbsA2InrRHUIyK0H2s0ORCpp6kiDIlsadP0BM/UCuIZy2hDgzTpSW1rNbOUv2cT1m1wLDX/JcMtFtvpW8FHtPNovvTGJ/bRUmyLei7kLL1ZBSs3EyrBy7sdGs0F+NkTHAPvjMqmEA+V5LlBYj1DptUMGIFMsQs5mgy2TZWmfddrYmYyph0MhIgenl8VvQyfY2gSY/fT0kjW530Yevz4sZQg9TJdI+iZo+E06TlTf7oMS9/fg7 2d6f8+dd Nm6m6meyux9D7/VaqFD0UAOfiY6I5F3qDioD+6Z9c1eLXF0VFTgnjQ++DQewOH7nNwomFgfuZXzA5C/D+YRl+cKpBm/PK/glZLleCLP/WmF5Yd/dgWla+mcOk1yCzYNH/CsQaxeY8Pn8enjV/1BuATc2DdlOzz5g+VP4aCX+221CuPXH3e7ef/elMZHdlEeNJ49zA+DDpGJLdHtVHdlzCHW9y9QJsBp4sS9VePkA01/hOlLDkIowhTBPyikMrfeh1LV6t6Rej2mt75++a+LQc8EkuKa8Ge+lkedPTHNaa8ihKcxvED4CQtzkNibcsa5UexHjKWOjdtley5jXOKq7Td4IJKg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
netfs, afs, 9p, cifs: Delegate high-level I/O to netfslib
|
expand
|
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index c4229c5f3f54..1bd20bdad983 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -145,6 +145,8 @@ static void netfs_free_subrequest(struct netfs_io_subrequest *subreq, struct netfs_io_request *rreq = subreq->rreq; trace_netfs_sreq(subreq, netfs_sreq_trace_free); + if (rreq->netfs_ops->free_subrequest) + rreq->netfs_ops->free_subrequest(subreq); kfree(subreq); netfs_stat_d(&netfs_n_rh_sreq); netfs_put_request(rreq, was_async, netfs_rreq_trace_put_subreq); diff --git a/include/linux/netfs.h b/include/linux/netfs.h index d6f27000eeb0..06f57d9d09f6 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -214,6 +214,7 @@ struct netfs_request_ops { unsigned int io_subrequest_size; /* Alloc size for netfs_io_subrequest struct */ int (*init_request)(struct netfs_io_request *rreq, struct file *file); void (*free_request)(struct netfs_io_request *rreq); + void (*free_subrequest)(struct netfs_io_subrequest *rreq); void (*expand_readahead)(struct netfs_io_request *rreq); bool (*clamp_length)(struct netfs_io_subrequest *subreq);
Add a ->free_subrequest() op so that the netfs can clean up data attached to a subrequest. Signed-off-by: David Howells <dhowells@redhat.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org --- fs/netfs/objects.c | 2 ++ include/linux/netfs.h | 1 + 2 files changed, 3 insertions(+)