Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp191476ybb; Fri, 3 Apr 2020 00:28:31 -0700 (PDT) X-Google-Smtp-Source: APiQypIs1v+3ALRo50OCpse0Rolmd/3CGKE7BE0FQSZ2EqZabuYwEvrMDJn6irFBCM8FJKMubkIE X-Received: by 2002:a9d:1d67:: with SMTP id m94mr5442926otm.140.1585898911017; Fri, 03 Apr 2020 00:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585898911; cv=none; d=google.com; s=arc-20160816; b=s34obX3YYLk8/rPhzPIxIvU4AdkW76gnzYOkLquqa2eW25N5iJp2kYrkZwQpp5w6jV cRhwDN64lMcLtmcpTUbHX1dYH1/y3A7qR4Ia4VefV26NaOJQw6G5bmd3/tW52/2257y7 ZrLGngI0U9dzvlW4ygy9piCO5OmQtG2XBbRqn7wYMwQuXjFI8IQoYcsXPpZXAdLByk46 zj0dPOzrcNICkE/APvH3sC7Sj+nFzAZsKv+mQBZ4L84ZeFvCb9Zxtd6+hu9kfs/0g2Aq MeFr/hXNeGJvlQGRhMu94Icvx76vmgyUjrFcAcEjB5tuF1/d/i0a9iyyFF0o2zQ+UzB4 Ddyw== 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=Tsj5hYDh4vvx9q0hhXXFnMg46jpw8vJ3CS6y9kj8Zo0=; b=rEu2Q+LPS+JDTkvEFSvZ/SOJXpfmod4Kyp2svvitQTARh32Gn0Uwbc21Vcpmfz8jcc w6wmXFcF91YdzX8PSSnRb8Qu6fcoPwqLqSPgPIxPjCar2Mpm0nfaEHbwPo/wCK0PF08R T80/5zfkY/wvKft/lAVWg6BEiLtRnTgBNeZ5UArWzhzzPRttPvqGqaCQVhqPNW+mzt5q SfIBtlktFbnRJjdZotvi/XUcfW0OYN2DmMWtyEgddi/amFaSzPd5SOZBW2eT/OWPWxTD +Q59vhPzqrkPV4vS+Z4wPaktk2Kd5vAtPc9malpw8zeJhnxEx7B1pnco4rqqrg+MXA/l ifYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61si3408441otb.20.2020.04.03.00.28.11; Fri, 03 Apr 2020 00:28:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389191AbgDCH1e (ORCPT + 99 others); Fri, 3 Apr 2020 03:27:34 -0400 Received: from verein.lst.de ([213.95.11.211]:51430 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730889AbgDCH1e (ORCPT ); Fri, 3 Apr 2020 03:27:34 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 7785668BFE; Fri, 3 Apr 2020 09:27:31 +0200 (CEST) Date: Fri, 3 Apr 2020 09:27:31 +0200 From: Christoph Hellwig To: Ira Weiny Cc: Christoph Hellwig , Jan Kara , "Darrick J. Wong" , Dave Chinner , "Theodore Y. Ts'o" , Dan Williams , Linux Kernel Mailing List , Alexander Viro , linux-ext4 , linux-xfs , linux-fsdevel , Andrew Morton , Linus Torvalds Subject: Re: [PATCH V5 00/12] Enable per-file/per-directory DAX operations V5 Message-ID: <20200403072731.GA24176@lst.de> References: <20200309170437.GA271052@iweiny-DESK2.sc.intel.com> <20200311033614.GQ1752567@magnolia> <20200311062952.GA11519@lst.de> <20200316095224.GF12783@quack2.suse.cz> <20200316095509.GA13788@lst.de> <20200401040021.GC56958@magnolia> <20200401102511.GC19466@quack2.suse.cz> <20200402085327.GA19109@lst.de> <20200402205518.GF3952565@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402205518.GF3952565@iweiny-DESK2.sc.intel.com> 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 Thu, Apr 02, 2020 at 01:55:19PM -0700, Ira Weiny wrote: > > I'd just return an error for that case, don't play silly games like > > evicting the inode. > > I think I agree with Christoph here. But I want to clarify. I was heading in > a direction of failing the ioctl completely. But we could have the flag change > with an appropriate error which could let the user know the change has been > delayed. > > But I don't immediately see what error code is appropriate for such an > indication. Candidates I can envision: > > EAGAIN > ERESTART > EUSERS > EINPROGRESS > > None are perfect but I'm leaning toward EINPROGRESS. I really, really dislike that idea. The whole point of not forcing evictions is to make it clear - no this inode is "busy" you can't do that. A reasonably smart application can try to evict itself. But returning an error and doing a lazy change anyway is straight from the playbook for arcane and confusing API designs.