Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp412592lqm; Wed, 1 May 2024 04:51:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX11U2ty8/VSXjP+1y4H7HSnDRusLGv03JE9H0Nj+gGNP32nLoMTE/sXaEwhVCEA33ZyvRX6D12SrnrHYQ0vzUwQ9KQuJ8tgP7zdvZEEg== X-Google-Smtp-Source: AGHT+IHxZsURctAKXZmI8VU7ExKzznhIaZuyJ9mLIfb84xcJDz3sEzYtG6o7kYIRQUYPmXl444We X-Received: by 2002:a05:6358:f915:b0:186:1f52:540d with SMTP id kv21-20020a056358f91500b001861f52540dmr2232390rwb.28.1714564292413; Wed, 01 May 2024 04:51:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714564292; cv=pass; d=google.com; s=arc-20160816; b=l8jIpUShox2CHNNnclxFMMIUYmUBpS4Iwr7Uf/sErsJ5O8311BuAVqcuKQB9b0vdTS Qov3hYJcnM2HAYAxug1GyD89Puq36rHWjlPR3HnpujKHnMTTCdhLRdS7DPhnfAHsWS+H gH2OeDTAc9BaMKwbMTPr/7qf78cjBULj6GQ1e6TJbRE/sgG4krHb585hiaSbsFIO1jhZ z1ThYVl3s//+mztrVF0/P++Rjzbf42IcrdNkduXL39DlPVV4SSLgOzZ2CQzPm2S56oNh 25Rp8OV7ym+CZt2rBi0rb/2aTG04zR9LvRCIA0RYzh0XCTWoL1eODho4ppTTX0R3mUtQ rKDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-transfer-encoding:content-id:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :references:in-reply-to:from:organization:dkim-signature; bh=nnkmVhq2S0BNaQkleOd6XJ3VpQjTfweOjGM/NIr2sKM=; fh=QCT0nYxQLXnJJ3ZUAkpm7r7CxvT/Ht1bCmFJUrbrHyQ=; b=o/e4pxLeaDguJTObuSs/SmsGiAgd/L+KGIdFpwgcTZbxBXg8lLoF1IzMBbulGWuHFf E7pv/tKi8+zuJJb4axC5KWRdOmIGfgHGYaFUCFZ0fAuiIevwaxV1bDdU94Gx4Z6G42r0 UNK6zB9NbKJKbWd/eIYe1Q2hWbxCit8eRdR0PKJsmvPyFSNjuD/0SbwD3RCDjc/MjRwP JQyGwDiQXaWuR03nABNl6/rvyTLtPtc8NSBTEZ5qI9bVwXb6k/9JaCyasI7diISVgpJw iABmrgnvco3mJeSm+d8yWATUAm2z+NHcCuv8ZhpekX4kXfAik/WvhpBeuG/28SKER3hw HKSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PAM5MxBl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f10-20020a63de0a000000b005f060f7de70si23946995pgg.463.2024.05.01.04.51.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 04:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PAM5MxBl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3117-linux.lists.archive=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 02FDB285D92 for ; Wed, 1 May 2024 11:51:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24D3B7E777; Wed, 1 May 2024 11:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PAM5MxBl" X-Original-To: linux-nfs@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 9250E7FBD3 for ; Wed, 1 May 2024 11:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714564286; cv=none; b=dr3wD3utb1/PbhbSIs+xQbShyCeLqlGyyWlExvrl4yk6kq40gd8UQwJPXweT3g5Uj+EGVjUFZNGtKtbh+Q638G6FnK2MM6ZVoVuKKPz0U/imRDfGj4AApA9Ky8HSY8Iw99CescWRo3mu2ciFRl9nrxBEgkz5uSXOd15cdIfEGhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714564286; c=relaxed/simple; bh=oVTq80pkXwyoy7TcJqALMpS8YpNVIddBTvSgvA6rBi8=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=PMhcm87wQX3ktUUyDPzZ0z+LRL76Ua63pmIsjtWwVIlv462QDsWWt6RoWCpL32+cp2nTdWnIdIGsldR98BOd+e3E4djrv/oopzICGbHMjqvLzulniqCz5MqqkGTZzu8cql6vxOIb2NIzNQN0/tveU4S473OT3hrQzrw1j9qFsk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PAM5MxBl; arc=none smtp.client-ip=170.10.133.124 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=1714564283; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nnkmVhq2S0BNaQkleOd6XJ3VpQjTfweOjGM/NIr2sKM=; b=PAM5MxBlLuddov9UL5zV2h/d/H6iIyFtSPg9HYn2B6qo7JvsS872ZRWj++6sWiDNNetGpB q30OBxoXpl1F2D5ZlFzW1s6JsJhIKcuNiCsc704pmieDKPVnX8Xyw5TfuSNZiFfAXvH8Gt TK6qoSGNTbnI7J2oFjAopwn04JCVayM= 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-140-U1b9OOAKMZWq_gl7OFzGfQ-1; Wed, 01 May 2024 07:51:19 -0400 X-MC-Unique: U1b9OOAKMZWq_gl7OFzGfQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 67ED7812C52; Wed, 1 May 2024 11:51:18 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id E08F740C6CC0; Wed, 1 May 2024 11:51:13 +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: <20240430140056.261997-8-dhowells@redhat.com> References: <20240430140056.261997-8-dhowells@redhat.com> <20240430140056.261997-1-dhowells@redhat.com> To: Christian Brauner , Jeff Layton , Gao Xiang , Dominique Martinet Cc: David Howells , Matthew Wilcox , Steve French , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , netfs@lists.linux.dev, 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, Miklos Szeredi , Trond Myklebust , Christoph Hellwig , Andrew Morton , Alexander Viro , Christian Brauner , devel@lists.orangefs.org Subject: Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <438907.1714564273.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Wed, 01 May 2024 12:51:13 +0100 Message-ID: <438908.1714564273@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 David Howells wrote: > + .range_start =3D first, > + .range_end =3D last, > ... > + truncate_inode_pages_range(mapping, first, last); These actually take file offsets and not page ranges and so the attached change is needed. Without this, the generic/412 xfstest fails. David --- diff --git a/mm/filemap.c b/mm/filemap.c index 53516305b4b4..3916fc8b10e6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -4171,15 +4171,15 @@ int filemap_invalidate_inode(struct inode *inode, = bool flush, struct writeback_control wbc =3D { .sync_mode =3D WB_SYNC_ALL, .nr_to_write =3D LONG_MAX, - .range_start =3D first, - .range_end =3D last, + .range_start =3D start, + .range_end =3D end, }; = filemap_fdatawrite_wbc(mapping, &wbc); } = /* Wait for writeback to complete on all folios and discard. */ - truncate_inode_pages_range(mapping, first, last); + truncate_inode_pages_range(mapping, start, end); = unlock: filemap_invalidate_unlock(mapping);