Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1658835ybh; Tue, 14 Jul 2020 04:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3bHo+JBjrFM9HUAajjwYaKndpoet09Igh0SJPjyGsaXXyLVl8PFE76VrkVY/aOetydiNM X-Received: by 2002:a17:906:538a:: with SMTP id g10mr4209179ejo.354.1594724496922; Tue, 14 Jul 2020 04:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594724496; cv=none; d=google.com; s=arc-20160816; b=CXyyhVx9rlrITe6snIrU4veWi4YXGUAHbHGYGXeggCYLUqj/fncSQ6SBWEbLfdowBT mtK7p+jgXZOpu9QMhiUkyhB8uqYEUJdaLfOfpPKz51j+0BMDpQnXlh/UCA9zi5cAGBW4 WNnVIui2kAUN/uOqre7f4U4dZn0Alk3BkKkpOChhyMzaOOTD3DurQORfnJjyNEiiTnSD 8Cfi7V7Scq9vmJVc7iM+rTRUyf5ilbRRZ4pOgRJEbBuEp0UuCWMLtspDoxUDhwAnF11l BHuHgGICJPHZ58AFU6gWaougyC0pn21WIO1u4j4sQVAOcJJw+Cts8yD4ia/fHic3wltp nEow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vsnASkGg6O33FqoFupzqBidJ2HkmOj7rKEiwwO8ms+4=; b=lN/bGKLq1GrdPkNha0PCzapRGJ8t8HJFUNxVYYsthq3kDh6Tml/5JsLBPNChNM7RW+ +zKEmkFFNtYxyWNVTTniHr3CBz6gniPZNZWwTlq3D14bIuhjpFg3X88TMKJdUc9OtodN yKb/JNPvakuXyF5jJgrEBHFIq3sY+lxs3eg2mucYOGCBkqBtd9cQnjGoakfbdtFLHArJ Vu/QTNscjSb3WWSdVpT7vUn7XeLu3+OJuN6hYpoYkunsK8c8+aCkDiklkEkcO6zXP++D RFrd7Wj2paX9Lr55Iu5UlEvZoJSKTC1o4+Vy0Xr7zeONOzDXkuY49EylGs4BETYRImsp 3mEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si9988354eja.455.2020.07.14.04.01.03; Tue, 14 Jul 2020 04:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbgGNLAQ (ORCPT + 99 others); Tue, 14 Jul 2020 07:00:16 -0400 Received: from verein.lst.de ([213.95.11.211]:53816 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbgGNLAQ (ORCPT ); Tue, 14 Jul 2020 07:00:16 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 28D5B68CFC; Tue, 14 Jul 2020 13:00:12 +0200 (CEST) Date: Tue, 14 Jul 2020 13:00:11 +0200 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , Dave Chinner , Goldwyn Rodrigues , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 2/2] iomap: fall back to buffered writes for invalidation failures Message-ID: <20200714110011.GB16178@lst.de> References: <20200713074633.875946-1-hch@lst.de> <20200713074633.875946-3-hch@lst.de> <20200713115509.GW12769@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713115509.GW12769@casper.infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jul 13, 2020 at 12:55:09PM +0100, Matthew Wilcox wrote: > On Mon, Jul 13, 2020 at 09:46:33AM +0200, Christoph Hellwig wrote: > > Failing to invalid the page cache means data in incoherent, which is > > a very bad state for the system. Always fall back to buffered I/O > > through the page cache if we can't invalidate mappings. > > Is that the right approach though? I don't have a full picture in my head, > but wouldn't we be better off marking these pages as !Uptodate and doing > the direct I/O? Isn't that a problem if e.g. pages are mapped into userspace and mlocked?