Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756629AbdIHPjh (ORCPT ); Fri, 8 Sep 2017 11:39:37 -0400 Received: from imap.thunk.org ([74.207.234.97]:42298 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756510AbdIHPjd (ORCPT ); Fri, 8 Sep 2017 11:39:33 -0400 Date: Fri, 8 Sep 2017 11:39:13 -0400 From: "Theodore Ts'o" To: Dave Chinner Cc: Ross Zwisler , Andreas Dilger , Dan Williams , Eric Sandeen , Lukas Czerner , Andrew Morton , "linux-kernel@vger.kernel.org" , "Darrick J. Wong" , Christoph Hellwig , Jan Kara , linux-ext4 , "linux-nvdimm@lists.01.org" , xfs Subject: Re: [PATCH 0/9] add ext4 per-inode DAX flag Message-ID: <20170908153913.jjhzogjs5zpeea5v@thunk.org> Mail-Followup-To: Theodore Ts'o , Dave Chinner , Ross Zwisler , Andreas Dilger , Dan Williams , Eric Sandeen , Lukas Czerner , Andrew Morton , "linux-kernel@vger.kernel.org" , "Darrick J. Wong" , Christoph Hellwig , Jan Kara , linux-ext4 , "linux-nvdimm@lists.01.org" , xfs References: <20170905223541.20594-1-ross.zwisler@linux.intel.com> <20170906170754.GB17663@linux.intel.com> <20170907211303.GA23212@linux.intel.com> <5F58D3F5-D93B-4648-AE01-8A46956FBB4B@dilger.ca> <20170907215148.GA12669@linux.intel.com> <20170907221201.GZ17782@dastard> <20170907221900.GB12669@linux.intel.com> <20170907232543.GB17782@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170907232543.GB17782@dastard> User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 542 Lines: 13 On Fri, Sep 08, 2017 at 09:25:43AM +1000, Dave Chinner wrote: > > Okay, so other ideas (which you have also probably already though of) include: > > > > 1) Just return -EBUSY if anyone tries to change the DAX flag of an inode with > > open mappings or any open file handles. > > You have to have an open fd to change the flag. :) What if we only allow the S_DAX flag to be *set*, when i_size and i_blocks is zero? We could also require that only one file descriptor be open against the inode, and that it be opened O_RDONLY. - Ted