From patchwork Wed Jan 3 15:47:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13510209 Return-Path: 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 B70A9C3DA6E for ; Wed, 3 Jan 2024 15:47:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 169776B00D4; Wed, 3 Jan 2024 10:47:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F22D6B00D9; Wed, 3 Jan 2024 10:47:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EADA46B00D4; Wed, 3 Jan 2024 10:47:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D8E976B00CD for ; Wed, 3 Jan 2024 10:47:24 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A11481603D4 for ; Wed, 3 Jan 2024 15:47:24 +0000 (UTC) X-FDA: 81638429208.18.87F0F3D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id DC00B40021 for ; Wed, 3 Jan 2024 15:47:21 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VEpWuMPY; spf=pass (imf04.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.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=1704296841; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=T4zshVgbXU4KADwit5ys0TaPmzA2s1+8lP1tq0kT5oQ=; b=vVzZn7qwbXvDJ2F26v/JkfXqYz/4ojGubaf0JDr02QeWzEFgmVh/jUdI1KeP7dM3vr+rP1 9XXN9iyQk7l2XgvRCsPZtgaKlUaVZ1I+QzIZHMLOkv+XOyj9WPMlr53IckSoogPgrNbca8 wXvwgtgFe3Vou4NP8iJBKtet4yEjxeY= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VEpWuMPY; spf=pass (imf04.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704296841; a=rsa-sha256; cv=none; b=GxUba2kFhmktye5IcATM77c2hh5mVykanWcSmfgT24syHD0Lu59ZHFjiJ3sy1tPNhqxyLA 6IQdnuzB0d4ju9yzm7xbE1sD/vgj2vbKZCPbaq4cLCAxPUFKrVcgoyT3yvHPDjTIHdYK9z xumyWN9Av7E2Z9mFN/cS84HrFVKcnxE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704296841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T4zshVgbXU4KADwit5ys0TaPmzA2s1+8lP1tq0kT5oQ=; b=VEpWuMPY3MtXvcWapOe78oF2dSQ5eYY4an0qgFlrw8iFoH5AU/FdxATBKxDcnlsgGj6fip G+wg9BiStGUUDONiAvHZoU1rkmTcgwmNnYZ9v3OSgtTSIFzGT9ZCy9DqLbRsXZ8FwUPRVc hl9L3tox1PCMKK+xu9s/gaImK9bE/do= 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-586-Lmp8D3ZiP6Ojc5GmI18XTw-1; Wed, 03 Jan 2024 10:47:15 -0500 X-MC-Unique: Lmp8D3ZiP6Ojc5GmI18XTw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 A2F02884346; Wed, 3 Jan 2024 15:47:13 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6923E492BE6; Wed, 3 Jan 2024 15:47:10 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20240103145935.384404-1-dhowells@redhat.com> References: <20240103145935.384404-1-dhowells@redhat.com> To: Christian Brauner , Jeff Layton Cc: dhowells@redhat.com, Gao Xiang , Dominique Martinet , Steve French , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , 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-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/5] netfs: Rearrange netfs_io_subrequest to put request pointer first MIME-Version: 1.0 Content-ID: <396880.1704296824.1@warthog.procyon.org.uk> Date: Wed, 03 Jan 2024 15:47:04 +0000 Message-ID: <396881.1704296824@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Rspamd-Queue-Id: DC00B40021 X-Rspam-User: X-Stat-Signature: 1q3ehpjq7prwnc34e659ebthh1nujfsp X-Rspamd-Server: rspam01 X-HE-Tag: 1704296841-840365 X-HE-Meta: U2FsdGVkX1/Y21twI3js6uBECo3AsNEVI7C+RMv04oZOhkt0Jy1+oaJrrOKDIzXRbA4Mo99tqkfNnbPTML6P7ftENB19vp66jR7FC5h99anogxfzlJ3wcNcTMQ7x2Nm5DU61IFfrsw19jPuKm7YYHmBCkjTelIj9nVnmvaKZYhkfLalxeP4un9giabPHTDwhAo7O1Xfy96QcWVL1Ar29pycXUmfaWV43MTUxtLP2oavIERIN14D7e42154El0CdRVNbS4Iwb55dh7Z85sxb8pjX9hVAibmzT58SufsItNmk7SYMY2Gn6qmG2Kixw04xxUx4D4zYc4QUpgxhgrH3YgLNT2KCH484OxE9uiSWRl3JbdXQMSAmgUimLcQRSNzeV8dXdrjYslxpAUpvRLCoU0bFR++6a1clAkN8FhqpAJS9gmhNoooiXrtKfHWO5JdQGKBR7VqI1ZYd2WAwaSDWF89OBEsSJP9AI+vjL0RjHFqmt17YZ1qbWP3M6G2SlSaDLDN0Y4OQgcShEVO3WX4duZuTwWrWTPrytDbp1GHs6rFb9Nq3AAA5Qlb3HH+ZsdBwj85KSjWJGKzxtXKPTCxZLlT+XdDEMIrr/iQlfCeTwetZ6C30vkOGcQAYx1StHfE5d5vc7+ngPqPI40ojWol/mAlhY68Z2dZ8lY882KwdoAEipjIYHkXbxy7f3fSdzt+Tyv6zwk+ri9qyjSTM1cCtJF5D0HQJTd3e2LE7q9jv1IQoH2/EHKYDrlrjLIH2uei4QdCIHuXEWOotUhivaynEv6UYqon9bSbA/HpcKpsg2eZuPucnYpiHMTV8L7pIRxWgtfQKqrNxkdLBNRrmgUD0vSK0Zu6eme5IznTi+kQ4hCZYxuPozUl6iB0GUeiNQICFRStQsB7DLAPQAoaGG4v8z+xh6IhUbxQaqfoOZuWXxJsC6uIXhS1ihJAAkJdISzKcUM1M+h58RUnWm4QjWzwP B6zkKiJR 47K+4vSBbPuZXsUCcHDhTVq6bpNzXgE+PkUkKBhPObCO8949lpUGjZj7HaTMjVYAsImVtWqvwJ1aTMWrPisCyo6G2mtoHEtGic/FUm8T7YSnp/WW0HFp/39zZHYM9vLpA7VNl2VKTy1yRXvLr3k38zSB7AO7LKsBhyg0JjXnVPNmAUhb52I9yjVvZVrzcOWvj8UnfXV9ukFfNKKh0TZqj4R7G3FgLcrtkqT67TbJpGebFbXF4EfM4Z0tkPLDBEq2nQoJJ4dQhs2qnuNrWU4m2ICYSXNMcSPBQDw4wUy4cP+ZyfaVN/s+P0KlGCw+8PvdqgvUTG5WVVzllCD+FAjshIQUOuJ+F8ueVuZ+Crv8E11Fb82Ki3Tt8jnyMw1bwyUIcrY1LE2qfPULzCHVjp1CFfJli7f/QWDyNWFbJL4fHO7hxZO8= 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: List-Subscribe: List-Unsubscribe: netfs: Rearrange netfs_io_subrequest to put request pointer first Rearrange the netfs_io_subrequest struct to put the netfs_io_request pointer (rreq) first. This then allows netfs_io_subrequest to be put in a union with a pointer to a wrapper around netfs_io_request. This will be useful in the future for cifs and maybe ceph. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org --- include/linux/netfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/netfs.h b/include/linux/netfs.h index 852956aa3c4b..d3bac60fcd6f 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -204,8 +204,8 @@ struct netfs_cache_resources { * the pages it points to can be relied on to exist for the duration. */ struct netfs_io_subrequest { - struct work_struct work; struct netfs_io_request *rreq; /* Supervising I/O request */ + struct work_struct work; struct list_head rreq_link; /* Link in rreq->subrequests */ struct iov_iter io_iter; /* Iterator for this subrequest */ loff_t start; /* Where to start the I/O */