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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FEDFC47258 for ; Wed, 6 May 2020 07:58:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F134420714 for ; Wed, 6 May 2020 07:58:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KtCKCgXl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728477AbgEFH6H (ORCPT ); Wed, 6 May 2020 03:58:07 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:31766 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727937AbgEFH6G (ORCPT ); Wed, 6 May 2020 03:58:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588751885; 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=3XSAt+Mkup/SofBBKUCYx2i7ecGmmjnSIl1ryVz58Ao=; b=KtCKCgXlt9+zoWm+6SEPFsGCpBDVeqZ/IMkp9v2irAyOXuzIRgdgR6TzXd12mQrszqeqRJ hGa+A2Ed3YlHsA/ed+U6/Uk5tOXR7hf0OPR3I72YCrT1plGDrJBkaIY8L/IrrEDyWPoftG 2vt82OqIajgWqDakFsPA0JyXd8Ks5ks= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459--Q3klqpZNS2sU59OYqcCAQ-1; Wed, 06 May 2020 03:58:03 -0400 X-MC-Unique: -Q3klqpZNS2sU59OYqcCAQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A672B835B49; Wed, 6 May 2020 07:58:01 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-118-225.rdu2.redhat.com [10.10.118.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 014C45D9DA; Wed, 6 May 2020 07:57:58 +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: <20200505115946.GF16070@bombadil.infradead.org> References: <20200505115946.GF16070@bombadil.infradead.org> <158861203563.340223.7585359869938129395.stgit@warthog.procyon.org.uk> <158861253957.340223.7465334678444521655.stgit@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, Trond Myklebust , Anna Schumaker , Steve French , Jeff Layton , Alexander Viro , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 54/61] afs: Wait on PG_fscache before modifying/releasing a page MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <683738.1588751878.1@warthog.procyon.org.uk> Date: Wed, 06 May 2020 08:57:58 +0100 Message-ID: <683739.1588751878@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote: > > PG_fscache is going to be used to indicate that a page is being written to > > the cache, and that the page should not be modified or released until it's > > finished. > > > > Make afs_invalidatepage() and afs_releasepage() wait for it. > > Well, why? Keeping a refcount on the page will prevent it from going > away while it's being written to storage. And the fact that it's > being written to this cache is no reason to delay the truncate of a file > (is it?) Won't that screw up ITER_MAPPING? Does that mean that ITER_MAPPING isn't viable? David