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: 184785 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5097599dyb; Wed, 3 Jan 2024 07:48:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGynn5P07L8A6adPe4KFO4JNDX1BMBroSiz+BB4c++RqYNrE9GH2UKjoq/4asi92XvrGEAt X-Received: by 2002:a05:6a20:9757:b0:197:239:8a7a with SMTP id hs23-20020a056a20975700b0019702398a7amr2269212pzc.117.1704296880734; Wed, 03 Jan 2024 07:48:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704296880; cv=none; d=google.com; s=arc-20160816; b=hGuNkhl0ariGEqeJoI78cjwrEBOWXhkDqed4Ifa3zA+UOfsOGDEnYCmFzlLvpCnKie 7goK5mEdxYPjsMsFzSNPOV6NbVJ/4qp/JRr0MGN569yKzjycXKhtgF9ZWclHbr99HazJ IHClcOistzgClYIav0covrzwhvh7JD1dd+g80dCGVDHhcmIHFLUGcFVdOxJWiPcPXmao qx4uH+nHiRQPCVcu/P4GflpFmL6+GBKFfodlmOlcQ0EVpsvGtZBYKzpYPFbmF+QiXn/X 0SFWAQB/Ab8o8N1QmAUknmS0Jftx1q3oczeyVKfVZZPKkVB7B1MjLlQ0trFevzeTKacU TAWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:from:organization:dkim-signature; bh=T4zshVgbXU4KADwit5ys0TaPmzA2s1+8lP1tq0kT5oQ=; fh=QZlVHPyl8yYa5caLwIeYCrH2oilTyNh0FuJMluNO+3A=; b=Y3djmnbNBG21Cn7T+3NhwV/RS0QTimzTC1iocY++rx3T/k/amVJ/Aep8W9ZrQfZ25o pUkv1z6gKB/pJQLkvTwkTGEqqcsoerd1bsWzK3O4neP6dMXeJZrK4HDueIFpXgGbr5mU r+sOYdZV9OJaWI+yyVr4cfuEHNYEjzoECNBXzBhD282Ksg5qSgaV0wnQZrPdlBeTQsno 3uPJXRzpLZ9Xycrmtem4cdnOhLPLpXq2HXkxY63wwgAiFsHnbBvGVXMvGgNlwCwpm0J0 6qoKxgMZlTfQEZ4yyCuqymRDqMx4CzXGqK42g8Xg3Z1pBpDzxrNpdOOOdfk+QMLt4QX2 qjFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BGMgJIQW; spf=pass (google.com: domain of linux-kernel+bounces-15713-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15713-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x2-20020a17090a8a8200b0028cb0ebb003si1397904pjn.90.2024.01.03.07.48.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 07:48:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15713-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BGMgJIQW; spf=pass (google.com: domain of linux-kernel+bounces-15713-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15713-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 84D7D285FA8 for ; Wed, 3 Jan 2024 15:48:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB7811BDEE; Wed, 3 Jan 2024 15:47:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BGMgJIQW" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 008661B26F for ; Wed, 3 Jan 2024 15:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704296842; 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=BGMgJIQW67XbbSphRTd+MzDxQd79LorGW3BfG2KPsbsIetz8XNtPEcWeSBcpDbBRpk9VoK EG8rV3LJ2iygbgTEl8DJ2GJ4V47UOLzNlqUiY59/iMZ+yGgxixiGnRZZ4K+VUEXjFkLHCs hfLRZ64w/0qZptKPpHsdKb8c+fmjk/4= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787084806434210294 X-GMAIL-MSGID: 1787084806434210294 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 */