[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200409150331.GG664132@iweiny-DESK2.sc.intel.com>
Date: Thu, 9 Apr 2020 08:03:32 -0700
From: Ira Weiny <ira.weiny@...el.com>
To: Dave Chinner <david@...morbit.com>
Cc: linux-kernel@...r.kernel.org,
"Darrick J. Wong" <darrick.wong@...cle.com>,
Dan Williams <dan.j.williams@...el.com>,
Christoph Hellwig <hch@....de>,
"Theodore Y. Ts'o" <tytso@....edu>, Jan Kara <jack@...e.cz>,
Jeff Moyer <jmoyer@...hat.com>, linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH V6 4/8] fs/xfs: Make DAX mount option a tri-state
On Wed, Apr 08, 2020 at 10:48:01AM +1000, Dave Chinner wrote:
> On Tue, Apr 07, 2020 at 05:09:04PM -0700, Ira Weiny wrote:
> > On Wed, Apr 08, 2020 at 09:59:09AM +1000, Dave Chinner wrote:
> > >
> > > This is overly complex. Just use 2 flags:
> >
> > LOL... I was afraid someone would say that. At first I used 2 flags with
> > fsparam_string, but then I realized Darrick suggested fsparam_enum:
>
> Well, I'm not concerned about the fsparam enum, it's just that
> encoding an integer into a flags bit field is just ... messy.
> Especially when encoding that state can be done with just 2 flags.
>
> If you want to keep the xfs_mount_dax_mode() wrapper, then:
>
> static inline uint32_t xfs_mount_dax_mode(struct xfs_mount *mp)
> {
> if (mp->m_flags & XFS_MOUNT_DAX_NEVER)
> return XFS_DAX_NEVER;
> if (mp->m_flags & XFS_MOUNT_DAX_ALWAYS)
> return XFS_DAX_ALWAYS;
> return XFS_DAX_IFLAG;
> }
>
> but once it's encoded in flags like this, the wrapper really isn't
> necessary...
Done for v7
>
> Also, while I think of it, can we change "iflag" to "inode". i.e.
> the DAX state is held on the inode. Saying it comes from an "inode
> flag" encodes the implementation into the user interface. i.e. it
> could well be held in an xattr on the inode on another filesystem,
> so we shouldn't mention "flag" in the user API....
Sure "inode" is fine with me. Easy change, done for v7
Ira
Powered by blists - more mailing lists