From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD56FC4345F for ; Wed, 1 May 2024 11:51:34 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OT9SHHlL; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OT9SHHlL; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTwQF3LNWz3cSY for ; Wed, 1 May 2024 21:51:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OT9SHHlL; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OT9SHHlL; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=dhowells@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4VTwQ81d49z3cFN for ; Wed, 1 May 2024 21:51:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714564282; 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=OT9SHHlL8RupNNmoLXSObNRi5PgRA/Wrt/ZcgGODSBC3PJ1Kzh2ydsThoiXfseIG/Ew07+ bEv8RLUcDBubX+W9oY+MuRWrcTZOVuIX+5hdof4zAgx/W7SCcYcveFsFBG483DGoIqr7ii NZkaCajjcqxDRpI5XPFvResXZBs5X1w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714564282; 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=OT9SHHlL8RupNNmoLXSObNRi5PgRA/Wrt/ZcgGODSBC3PJ1Kzh2ydsThoiXfseIG/Ew07+ bEv8RLUcDBubX+W9oY+MuRWrcTZOVuIX+5hdof4zAgx/W7SCcYcveFsFBG483DGoIqr7ii NZkaCajjcqxDRpI5XPFvResXZBs5X1w= 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 Subject: Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio 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 X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Howells , linux-mm@kvack.org, Marc Dionne , linux-afs@lists.infradead.org, Paulo Alcantara , linux-cifs@vger.kernel.org, Miklos Szeredi , Matthew Wilcox , Christoph Hellwig , Steve French , linux-cachefs@redhat.com, Ilya Dryomov , devel@lists.orangefs.org, Shyam Prasad N , Christian Brauner , Tom Talpey , Alexander Viro , ceph-devel@vger.kernel.org, Eric Van Hensbergen , Trond Myklebust , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netfs@lists.linux.dev, Andrew Morton , linux-erofs@lists.ozlabs.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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);