Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1659468ybh; Tue, 14 Jul 2020 04:02:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5uWw2//6kCnuWEjLicyCahWdM1IH4HxTbzzMFiAsbW0lGK+ez7Zs9a8AL77/YT7/sw4Ef X-Received: by 2002:a05:6402:1a3c:: with SMTP id be28mr4065665edb.140.1594724551222; Tue, 14 Jul 2020 04:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594724551; cv=none; d=google.com; s=arc-20160816; b=LuJxvwY9sqGsBvdYRSJg+acKJNBD3iowPIThR9/NsXgEcsvyCA6+P5kQzl9Wi2i993 5zn9lTGAjpbq5zlR2ive4ZWeHAzgh4dGrjCVb/kxKnKpKrBdFiNvnlRsMV/d5Y5R5yPR hy/Ff12DREE8ctZ/8rEc8L23pI8mfM/hh2v+nBqr+PsujyUmxDNFlHC0n6pqRCvxBLrA BNUqS95+U4jFKGFPWY/kemwO/I/Qf2e361iNhANw868tPxG5zOu4WIjVV5w8WDRfrVK8 7OZNefWQqFAt2lxHPUSUkGk069NzZyk9S6eAU5FQNNM09YxBezUTlAlR+EWD1ytp9iQk er8Q== 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=TLlOW/MWCFQ9GDcovDFx7kTncp5+rNNFSOWJhzuqJaA=; b=SkQvmvDRDWJts6da2t7CiXY4CikFNF7AvqAQwFq1tP7q5HxKnrIJMvoN4vW0H0Do8r KAiMZoc5V9OIwSk4mfmEvQB3kHjo9hCO3td7rttBLLT0MKPiSFH76sJu52lO6sYXbevk kgAhPqtM/t37BAgGalY1nk2kvlDP67p4jJr5AEaRC+1AA1xYaQng+/uGBc1ZF1wwffyy Ata2vQtwY92ED2+id9zqbKmG5V7iVUYWvANf04oaXzW4aE6x9t9xwQi0dDHnylqZRrAs VqBe2gqHzdrjU3GRXfZXRwib9bV9wHEyGxJPO8/2T51/RDlzvkBAZQSP02curXo9iOvO X2iw== 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 r12si10529573ejs.370.2020.07.14.04.02.07; Tue, 14 Jul 2020 04:02:31 -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 S1727021AbgGNLA7 (ORCPT + 99 others); Tue, 14 Jul 2020 07:00:59 -0400 Received: from verein.lst.de ([213.95.11.211]:53826 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbgGNLA7 (ORCPT ); Tue, 14 Jul 2020 07:00:59 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2343368CFC; Tue, 14 Jul 2020 13:00:56 +0200 (CEST) Date: Tue, 14 Jul 2020 13:00:55 +0200 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Dave Chinner , Goldwyn Rodrigues , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Matthew Wilcox , 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: <20200714110055.GC16178@lst.de> References: <20200713074633.875946-1-hch@lst.de> <20200713074633.875946-3-hch@lst.de> <20200713153920.GU7606@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713153920.GU7606@magnolia> 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 08:39:20AM -0700, Darrick J. Wong wrote: > -ENOTBLK is already being used as a "magic" return code that means > "retry this direct write as a buffered write". Shouldn't we use that > instead? > > -EREMCHG was a private hack we put in XFS for the one case where a > direct write had to be done through the page cache (non block-aligned > COW), but maybe it's time we put that to rest since the rest of the > world apparently thinks the magic fallback code is -ENOTBLK. Sure, I can switch the error code.