From patchwork Wed Dec 13 15:41:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13491479 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 E72BCC4332F for ; Wed, 13 Dec 2023 15:42:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B3A58D0036; Wed, 13 Dec 2023 10:42:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 73CA98D0035; Wed, 13 Dec 2023 10:42:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58EA28D0036; Wed, 13 Dec 2023 10:42:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3FA4D8D0035 for ; Wed, 13 Dec 2023 10:42:01 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 17C3340207 for ; Wed, 13 Dec 2023 15:42:01 +0000 (UTC) X-FDA: 81562210842.01.9EA5EC8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf23.hostedemail.com (Postfix) with ESMTP id 2E66E140017 for ; Wed, 13 Dec 2023 15:41:58 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YiYbvk5V; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.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=1702482118; 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=jdMK2KsBWpd3n96cWJQ992Ioikk1fLU4p2UyRf9hgqM=; b=XaFqXMV74BR4VGespy4V3JbSaNCeubbnXy6ZDM3VYbr6XKUnCAbCn1h6Yp36qRb25ruRRQ TeYg/dPLSMNjZLUt10WSkYUiN0V8tvttGXthqTOWaVhSqO0D2z2CeJiTYN99FnM0LXJM2d PO4k73z+B7aFzTkqRscrfVF+48qk6oQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YiYbvk5V; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.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=1702482118; a=rsa-sha256; cv=none; b=UDZZpaX2dcZ/Wt6nKquEE6JzeXn8BlsPZx4JJ0iTguleFxArviyvxUcvhzQaa7BUjOOyO9 AKXzDTti1uFwYYjGiV57fB3UFJCrDUHz7ubUDhcQvN/cCmnZiZe+1mH3/RnoqYVahBj2s2 /ln3DcXLssvOMR3crepDWeDo0aP3Rzs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702482117; 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=jdMK2KsBWpd3n96cWJQ992Ioikk1fLU4p2UyRf9hgqM=; b=YiYbvk5V2edU6WESAvjCzsUKiT74F/T74MoiAHl8zIE8fMrQq2firybQQjOnKWvbwYHruY a7b2YVsnAeWjhha+v1PSssIPClwRNGMDIRISBOItev9JgFwIrTYpG0MBL2PNlI4r/SoccE m7U0twUUyBCZwx6phDmhQ38WEZHpE6o= 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-588-jGrwNu_PNXyGiaXqvbNtcw-1; Wed, 13 Dec 2023 10:41:50 -0500 X-MC-Unique: jGrwNu_PNXyGiaXqvbNtcw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 8C3C18828CF; Wed, 13 Dec 2023 15:41:49 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E92851E3; Wed, 13 Dec 2023 15:41:46 +0000 (UTC) From: David Howells To: Jeff Layton , Steve French Cc: David Howells , Matthew Wilcox , Paulo Alcantara , Shyam Prasad N , Tom Talpey , 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 v4 01/13] netfs: Rearrange netfs_io_subrequest to put request pointer first Date: Wed, 13 Dec 2023 15:41:27 +0000 Message-ID: <20231213154139.432922-2-dhowells@redhat.com> In-Reply-To: <20231213154139.432922-1-dhowells@redhat.com> References: <20231213154139.432922-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: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8tMJJp T9ZYyx3S QvwnYVYlgpshnQWI/kPJElRA/5ThppFVHM6P1ls2CEJ1sCR4flVg+BHy1eHXew27NPdjuvzhqH7Bi0OsT/aWXZu1SS7i/uXcHDHyYvqpJEigduT7rXKfpDDd7uLjT8+VfLs1Oyt889wKdHx8tKsDMTiS9B6zaPiqZIuBeeXqPA5rYUYanpECpLyc0+lxR3eRQ8MQ/ISJt77FXBSXavBGWWfLdytxMp+B5VaGyAXdvIZx7+JiEeguNRy0RfnhVJvs3Wwt7207/EJ5ItN1Q2Iof3OeAj6PkRXrMaeAt7CeRttkaSRhM+jTmAuizm2WuULNSRlG30au+TLJveDrlnVIFrfP/xnwvusGnmtrV4oOYYHE7jX47CVRtYlZTy2R8MwvV5y1koWSWJx8NZUNmPGfaUstab5+OJF9vmD2Nn/5ig/Ap4gPjjC05RPuuA1rSOO5g8wIpExIdloA9iQNd7+PDV9Mv3s9mamLrbc98dZhtDQ+TYmfqr3/U2gV/3A== 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 2005ad3b0e25..c927df141385 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 */