Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969603AbdIZOhr (ORCPT ); Tue, 26 Sep 2017 10:37:47 -0400 Received: from verein.lst.de ([213.95.11.211]:58908 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967445AbdIZOhp (ORCPT ); Tue, 26 Sep 2017 10:37:45 -0400 Date: Tue, 26 Sep 2017 16:37:43 +0200 From: Christoph Hellwig To: Dave Chinner Cc: Jan Kara , Ross Zwisler , Andrew Morton , linux-kernel@vger.kernel.org, "Darrick J. Wong" , "J. Bruce Fields" , Christoph Hellwig , Dan Williams , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 1/7] xfs: always use DAX if mount option is used Message-ID: <20170926143743.GB18758@lst.de> References: <20170925231404.32723-1-ross.zwisler@linux.intel.com> <20170925231404.32723-2-ross.zwisler@linux.intel.com> <20170925233812.GM10955@dastard> <20170926093548.GB13627@quack2.suse.cz> <20170926110957.GR10955@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170926110957.GR10955@dastard> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1201 Lines: 24 On Tue, Sep 26, 2017 at 09:09:57PM +1000, Dave Chinner wrote: > Well, quite frankly, I never wanted the mount option for XFS. It was > supposed to be for initial testing only, then we'd /always/ use the > the inode flags. For a filesystem to default to using DAX, we > set the DAX flag on the root inode at mkfs time, and then everything > inode flag based just works. And I deeply fundamentally disagree. The mount option is a nice enough big hammer to try a mode without encoding nitty gritty details into the application ABI. The per-inode persistent flag is the biggest nightmare ever, as we see in all these discussions about it. What does it even mean? Right now it forces direct addressing as long as the underlying media supports that. But what about media that you directly access but you really don't want to because it's really slow? Or media that is so god damn fast that you never want to buffer? Or media where you want to buffer for writes (or at least some of them) but not for reads? It encodes a very specific mechanism for an early direct access implementation into the ABI. What we really need is for applications to declare an intent, not specify a particular mechanism.