Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2139324ybb; Thu, 2 Apr 2020 14:00:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKMvpCZK6cUjmSwUmRVJIqfn2Kk5zpuagb8irgAa8T6GKcrjE5HDicLltRBWPR0pauwI8cE X-Received: by 2002:a05:6808:2c7:: with SMTP id a7mr735994oid.149.1585861223734; Thu, 02 Apr 2020 14:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585861223; cv=none; d=google.com; s=arc-20160816; b=yyPA5RoGU+PMHo/OkaKENDZtdbVyndEVHOab0RmuR9s/Skz6FKH7s+AQnlHN7dRBZT 8EBP+R072GfFQFBf4ZtbEEX5hmXrpuEbp7umdlHY9G+qSQazZ12hd3lByRMx/pNygA4v b1mxQK0efTe5CNrdo05ItFWrf3F3HgFFWlwr9YmEsMQVgLBKZ58SQWyPkPYzpmdj+FAr tJ17yl7g3fZGtleAnRHQXB/APX02VIDi4g/jyG4i8UQYG7fN8r0MoKjSLVjGsjyzlo7d 1SOkgFpLU9dkUusnlJM4d3g4iydlL5KrQDEk/6EcE+Tpprwu0Fs+ULgTQN/2B9SvbpXt XuNQ== 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:ironport-sdr:ironport-sdr; bh=EZGEyzgJ8sqQJFDyrpbg3V4GudldOO3AwZMMJbNGrLg=; b=KCQCcJvqbHSrKXqSu6mKKekLB8E7oqmxyK6ET8NUWrfALO91ao+KJ2t9ADYj/ji9cL KaBopZuaJDLkLWGC5rObTtMfRO0FBq/cTdDLirVf0w0Yz5rKFm6Nlre3WTJ9DVgV3xia B145MThBmiXVVaYCb8deiXhCGeBOUIVpiakw4UbX3aC+KKiUjTfveHOByWr2bXJ5o05v N6mRqh25LNJ1JqAqx6L95O/XVplYVGgI9I6xNLpWbxwObHErNh+tD39Qs0vaZpA5jitM 11XXnZ7WBXiuCht7HnqwkaTkTw9oZbNaTfc72lDVl3o3fTiOtRjneXi7Wg+7ZPljDIe9 Ld/A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si3000113otd.115.2020.04.02.14.00.05; Thu, 02 Apr 2020 14:00:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732218AbgDBUzV (ORCPT + 99 others); Thu, 2 Apr 2020 16:55:21 -0400 Received: from mga11.intel.com ([192.55.52.93]:46980 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbgDBUzV (ORCPT ); Thu, 2 Apr 2020 16:55:21 -0400 IronPort-SDR: HvX8PTnsRwsdV7NgJbUfU0c8d8qEGuDIWYKkfp6qg1t4NgkZEVSEZhF+lJsaHGmNws25xH9pv2 zG5CuBBU+CEQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2020 13:55:20 -0700 IronPort-SDR: n7VuT2YXbKLcmeUbGxcVNFXBqmmw/fPac17FJw0a0KoOKT0y+uax/DxdhYqSxrNozLBsG2D32X Ll5cGSDLDUmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,336,1580803200"; d="scan'208";a="253141592" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by orsmga006.jf.intel.com with ESMTP; 02 Apr 2020 13:55:19 -0700 Date: Thu, 2 Apr 2020 13:55:19 -0700 From: Ira Weiny To: Christoph Hellwig Cc: 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: <20200402205518.GF3952565@iweiny-DESK2.sc.intel.com> References: <20200305155144.GA5598@lst.de> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402085327.GA19109@lst.de> User-Agent: Mutt/1.11.1 (2018-12-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 10:53:27AM +0200, Christoph Hellwig wrote: > On Wed, Apr 01, 2020 at 12:25:11PM +0200, Jan Kara wrote: > > > - Applications must call statx to discover the current S_DAX state. > > > > > > - There exists an advisory file inode flag FS_XFLAG_DAX that can be > > > changed on files that have no blocks allocated to them. Changing > > > this flag does not necessarily change the S_DAX state immediately > > > but programs can query the S_DAX state via statx. > > > > I generally like the proposal but I think the fact that toggling > > FS_XFLAG_DAX will not have immediate effect on S_DAX will cause quite some > > confusion and ultimately bug reports. I'm thinking whether we could somehow > > improve this... For example an ioctl that would try to make set inode flags > > effective by evicting the inode (and returning EBUSY if the eviction is > > impossible for some reason)? > > 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. Ira