Message ID | 20231013160423.2218093-6-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 EE32ACDB47E for <linux-mm@archiver.kernel.org>; Fri, 13 Oct 2023 16:04:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D3DE6B00AF; Fri, 13 Oct 2023 12:04:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 08C116B00AA; Fri, 13 Oct 2023 12:04:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C19A96B00AF; Fri, 13 Oct 2023 12:04:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A7C9A6B00B0 for <linux-mm@kvack.org>; Fri, 13 Oct 2023 12:04:53 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 777571A03B4 for <linux-mm@kvack.org>; Fri, 13 Oct 2023 16:04:53 +0000 (UTC) X-FDA: 81340911666.25.EC3A660 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id B2A811C0033 for <linux-mm@kvack.org>; Fri, 13 Oct 2023 16:04:51 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hpi0ilEB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf18.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697213091; 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=qZVSDRhH8TCwDqqtYYaWhbNXvdmkKJuIxH0fFLIHYlQ=; b=V5sYDvlx28aZfUlRKJx77KeJczGLvgi8RHjoocvNvbI+buIhpG2mnFbaPuPE1lp9XrUom5 IkhpreLI75Lcslb/XvmioldPfM04kn4kiiEX8bDEqMH3tAH0PqdQ1TmbIeU6JCJDTWNIke fmbLRlkgP4xzGF+QrEZHQTudJ+P7CNk= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hpi0ilEB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf18.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697213091; a=rsa-sha256; cv=none; b=4OTMSf20/0D37+rm7aaOuKIuuFZ/rMEghCbXtBpEvW2jWwTXX73TDV07QZwsAiuOKaevb/ f3oHLGlk4oCeCIBdvtM62qzLyJOrqw3FKcoYvnG8nnhh/GSUBehzslhY6RdjVjrW06VKMj G4Otin7j1ikqXLV0zV7nCzpQXiqhCB4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697213090; 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=qZVSDRhH8TCwDqqtYYaWhbNXvdmkKJuIxH0fFLIHYlQ=; b=hpi0ilEB00DhYfTihJX0KXx2OwxgV88WRvmlGcfr/6YNboQjZzbH/YEE/PRJJqv6DSLZIc gfldEI+yCYBonR0zI/YDuGnvPVV1nsXqRry4rO39DCfa4lpNnkSJyKpWt2cWw/naXDzMYD aDXFhwnEvxMc2WMYXpaXMjX2M0rLO80= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-584-1TUMEKTKP-Sh9eEOTPIfmg-1; Fri, 13 Oct 2023 12:04:46 -0400 X-MC-Unique: 1TUMEKTKP-Sh9eEOTPIfmg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6368C87B2D6; Fri, 13 Oct 2023 16:04:44 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id B58021C060DF; Fri, 13 Oct 2023 16:04:41 +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>, Ilya Dryomov <idryomov@gmail.com>, Christian Brauner <christian@brauner.io>, 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, linux-cachefs@redhat.com Subject: [RFC PATCH 05/53] netfs: Add a ->free_subrequest() op Date: Fri, 13 Oct 2023 17:03:34 +0100 Message-ID: <20231013160423.2218093-6-dhowells@redhat.com> In-Reply-To: <20231013160423.2218093-1-dhowells@redhat.com> References: <20231013160423.2218093-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-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B2A811C0033 X-Stat-Signature: 9zdsa8uqo5nugq8yf3gnh3g9hzxyx95c X-Rspam-User: X-HE-Tag: 1697213091-477377 X-HE-Meta: U2FsdGVkX19cqF4VLAkYm2VY/2w6yvkkPBdAcJq0DmPbQzdE9kprsN0fB8L7TewX6Cp9iDWC7Sn5FFsu5NpuXK3lMHGzGEEtjMP3+NLoJK/RH0kJMUswKSTONqoGG/FJAqAbVgncNAltoFTK5gwr5X0HIPeGyBXwbkES0tO/z3rW1QF558LaLiM/Oo9CSNv28RBlpQFOB3h2T9t1rq2k71qovk8s46lfRWxd2L3Pv7ZvViPFyLCU5Hqpz/QFIL1HX2QTE5shXCa8cIB/nsTPHaz862ikJupoy5FgWVM0tbTWvO+ffan9/4DbvGzuEpZld8K1j9Uu27tai+2Gky2Pgzjn6FPfpG8dPJmjIiGGtx6sdmDaUQuOKaO4VY3VWpl1cw0V6VsnA5FInd7X+qxhZow/osKJLhX5HCE+ZLjS8TAQxggvRsEDYpNK5Ub7CAc+a0y9r39NRpqx86FjXflpc3gI/ys8qVk/QnHZFNbg/ntnQbrTIgw9cnRfj41v4TuUO3xdenDs/IwQ8O4a1f75L+dKIw6pJanNw6oqoJFpXJfPetCdG9wHj1qd4aafFMJgs8rtdYWfldBaGdBh1XFfI1kfuA4TKAQyMkGtt+Duzi+ffMhxfwEb2iD41QwjtPCqtmePn0Mlhj4eXTAnT34EPcQk0wGU4npyu36Q6ovYFzTXMGxfzzHo/TLh0C0DAEbiK10xfNaWbX5HfQJI12GEId3Ha2OW54QmkOG+BUBvOnBh+CmNZBDwH8pfN5+n7opHBi1Fk4/tSFJUm00c/ONke+qnuemJZ62NkMsOtxHRCgHxwKhlVficcjnLtE3Z0Kt1gjyhiFEf99/tTUnaQt6sCchVvyxXrb3ZjpLRwIR9xE3FQNkf5v8h4LIAKJxlmn6mACxblq+DWyejL8WEf+NJnAyJuP+VBLyCzvSyBVl6mQEcIczQs63SGV0KRkwDcTr7ha45g08EgnO8VmQZLjU q202n9UW BUiC+5YKaz5h42J8DhU4o4YDZNqOVa4cJsm8Ifjf3bJW9Lp4dtF3p6g3REAXzrKSLclREEYvYYP85542e7GThz9/1HSGegOWlPMPubzUnyJFZ0R3JWtFehVQefixwgacUvW+eBaYY6vpjtRlz2Am8KkFDY+jA6SxfTUfjPwfJpVYcvIlm6VAwBNGFX+evloRpxC6T6rSDw/52Z6KyIiSS7S0Fpg7HM9KfF4+nYsJ51m9TXQndopOQdrWUT3UMHvF1uOg/VZ+4iBoFPjSLO7oBskiiHv02EXrLZjCA8hCyQR6ZnuXT9Gcgm5Optauvep1ix2RWkOs1rgMRBChK/fh1niLqlw== 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> |
Series |
netfs, afs, cifs: Delegate high-level I/O to netfslib
|
expand
|
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index 2f1865ff7cce..8e92b8401aaa 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -147,6 +147,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 6942b8cf03dc..ed64d1034afa 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -218,6 +218,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); int (*begin_cache_operation)(struct netfs_io_request *rreq); void (*expand_readahead)(struct netfs_io_request *rreq);
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(+)