From patchwork Fri Nov 17 21:15:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13459597 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 3F2EEC072A2 for ; Fri, 17 Nov 2023 21:18:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D9C038D005F; Fri, 17 Nov 2023 16:18:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D22DF8D005B; Fri, 17 Nov 2023 16:18:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B74928D005F; Fri, 17 Nov 2023 16:18:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A2DE48D005B for ; Fri, 17 Nov 2023 16:18:31 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 77C5B120713 for ; Fri, 17 Nov 2023 21:18:31 +0000 (UTC) X-FDA: 81468710022.14.A900DA2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf20.hostedemail.com (Postfix) with ESMTP id C0D231C0019 for ; Fri, 17 Nov 2023 21:18:28 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dzC7fXs1; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700255908; a=rsa-sha256; cv=none; b=bKDwTmDalWGm44824ByDdmBBieDcH2pFd5m32T631TJ8VbpVz0O3DN9bSicAosESIBoxqS SzJ+yRjPDAJF4kWLUzjrjUTGxzf+1rZLdE6m3WkTbAnFEvzx4oWem4+TYro/GtcX4MDU7c /+gSXGl7/KJomEwfviy4+To01TOCtgw= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dzC7fXs1; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf20.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.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=1700255908; 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=QKXGchFVFu30VVEYlT0R28R+sLxOTLkYu3+LCMsGmr8=; b=uHW5lyR48To74bSzxrkwZMG2p4Xl7qGY0eMV3j5YT3utPnf41nvIPL7blxiBo21ypK7VQv N1d/dh7z+WQMQOUvm7kpNiVLN+7OtAEvwwDPDlmtW8kogNGkzQDjBCIyeG5RnvPHqFmCe9 g4GDhCSL5Gg4LhpdeFRkzJKg7ZN7ri4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700255908; 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=QKXGchFVFu30VVEYlT0R28R+sLxOTLkYu3+LCMsGmr8=; b=dzC7fXs1YAYpl5eahF7idtW9eF12ic8wSOJ0RqoNudxbvEOIc2VHdzyKBu1iWdbuHiU4X0 VzFDdYoEkvTg0TUd5EPr/tQO4bvCgR+o6Tlz01DY7lfy88dXxPwSolwu793naLXsxnB89c mp5ts6bq2fXYR3R6Z2ww4I621C/+MFM= 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-547-IluzVOTwOhCkxzWhqG888w-1; Fri, 17 Nov 2023 16:18:21 -0500 X-MC-Unique: IluzVOTwOhCkxzWhqG888w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 B6B37811E7E; Fri, 17 Nov 2023 21:18:20 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFB782026D4C; Fri, 17 Nov 2023 21:18:17 +0000 (UTC) From: David Howells To: Jeff Layton , Steve French Cc: David Howells , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Dominique Martinet , Ilya Dryomov , Christian Brauner , 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, Steve French , Shyam Prasad N , Rohith Surabattula Subject: [PATCH v2 39/51] netfs: Rearrange netfs_io_subrequest to put request pointer first Date: Fri, 17 Nov 2023 21:15:31 +0000 Message-ID: <20231117211544.1740466-40-dhowells@redhat.com> In-Reply-To: <20231117211544.1740466-1-dhowells@redhat.com> References: <20231117211544.1740466-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C0D231C0019 X-Stat-Signature: 9qnacs5yas1cxx4oekg4m7a59ra59ye6 X-HE-Tag: 1700255908-381100 X-HE-Meta: U2FsdGVkX1++Zar5Or23mrHWZNAJM1CkLB0m0miOOQLp6a0ydGk5PkQbH8gQ++SQFFpSni0EqM4wmzsAdbyY4VALrbdKZixRN8Cll/Xcvn+wlJbGCHVtqSz69Gff+/XBgAmrZbhLsWtpemNZvzzlcp1B92PhUTRCFFqd80OCZZ7u3jmCTAjc0chX0V3QWir2EvIlenmQkQYAUljaLjlL0OHD6iYHN0XfgQp99deU/MzSGUGl8O1KV/4ca9Ocv62ZQTiJdApyER3mfOWtwIsv3RWRQLiOumTX+A85+xBPNDysntySzeY8s7C9jzlD4VSJ69J9NpX+/1LptlXktTO2eR5AcxITtfh9PKG6TNTcRAgnrqEwBQfx2G2eMLJDEhd4VaSNGDN1hUqgcCnNOnBsvyviL/HznNe502XPy5jizcgVRLgAuYY8YLwThJquUjalrCCcBItZx+k0DUW41UubqgbYJlXqgR04suDDUzWa+RTcCJeWO4I0GBy22ryy7poOVV9AYLQj6PKQrI50VJ2CJ3zGrZYpbO4Bm3v47LEvX7A0arh6E+VRcslb+R6wLeXhAp4xywOUKFviBy9NUumExq+dXQhVFCywCBIKCy/ZgOtugk85yzmO7v5K0AGsY70xHkx2vBaQvdvOcjv0+xFTfhlHgtqlNsI97n0QXkTVLi2Mh9uPSZwdizdySGdJLXw4uz8FDToAta1R6IhwJPejX6mhTGWVT3zKjSrkG93SdFDyULkXGzQkKhnF3kl+mGPpotnFgejxo3ggNkvWdxC9U6OtvUW/vbaUWkdjXMPN/Laq2JcSk2f78/FDbGf0Vpodfalttg0t4za55HTbjGp+ZZqsNPvjkwPsul70EuxFAY5o/wxoPalABFZAzsVWswfABVukkWjlkLP8GvPOpwbrgR88q4TtN7nbvt8F79vYhJ0S/tshyQWrEsrwBXEtF4hXAhnvGR8Epy6UU4NH9a1 CUgOjcI7 Kk5Xnv3yq0w6OyKAQ8mALbuFnqpCiEQTjstnX8f18UNTElka517zbJ7Si7v02ZZTee2lIimv+WxxXyvOM/wB8X2syV0s7XivDJueA6k6n6L2zzLxIhFCDjEbWjTje8FGF86LGGDDkKJPvMaAeQ5ugGOhvzNmqqU3Kx8K65AyhJHDSb84qCH7n872RmacoilWdlV5JIE1yVGLCg30IIha/OcRNhBWDj1nu2iWexZBberFpQlVRtahcBdBIqjNisBoySNGb50psT3++OOvlxeEiuK80R9tPC/wbYwmmbikT8tMDeDgmBUzmY5EzP8lC22PL8DG0xvsor8KXroWy+Dr80+rFKyWah0d50MhxXumbIK0OU/gPrAPC2gdlmRfytrefHvGUuXaXCYnPe5wlHLHDn/yAX7X9WJUtWVKAt0+6NQbKD8dDaHDRdnzZ4pSFTAhdFhY2m46Vqask0T+xYwvY2+Bc4L9Jx+AJSPYFAwaZu7nKPRAI/suiiOuOZA== 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: 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 for cifs. 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 39f885fea383..7d9b61d21a70 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -209,8 +209,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 */