Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1736542ybb; Thu, 9 Apr 2020 08:06:13 -0700 (PDT) X-Google-Smtp-Source: APiQypKUXG3iIdU044fcrqru4MCEEpFwWJ7/+7PqLplnyNa1tN4jMWDCmref88QvGQYGmrMLs1vW X-Received: by 2002:a05:6214:138a:: with SMTP id g10mr426043qvz.231.1586444773312; Thu, 09 Apr 2020 08:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586444773; cv=none; d=google.com; s=arc-20160816; b=IrS74FqHppdsAOLTYbyU5Snw0n9LE6CVLoZ9xMFBZIBvCjcLyImCAJQZ1PMOCCVCif KXBZNSm5tCK2HCkoGRfKweGeyqWMIe6y3V8Csb3W3XMyD1+o6rgGXnE6Ymaho7bIkc9q 94fyCSk8wHO6mmRbCUymHllRKdtr9YI+BcXTG8WUSari86Ayne0qOdh2ISDmKzBc0a4I wcQCNX8lSiw2jjrTI7JD5G5FaqfDtnn6Ch4S7WgiKJ5O6XbBrJa+70Ta1vYYbajbGmkA Ox7lGP/BgV5WyslGWfE6Et4nYvw9tC51CyUDvlZWaAf6KAPXhjVkSAyvvjVAiUACPsXP alUw== 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=7klvJYUWaR92JjL8OYNaHpYdVmvI6dNHE/ng0hF+AP4=; b=N1okvMQAXKAMBKCRuUqPlQOfyUNwLFJjtaXxib2JYTtuqYRzHZK3Apru4/h7O7xHq1 Dt+iI975eq1xjUHfAwHFRttuHHnWQWHR1PEJ9MGvq9k38za7CqLSe97xktalNpFLdpKF YMMuY6koL292KklaHn9VcFsL0YjdKX93028CHeDUCP71GEF04GYSZPw5iG12tcMOTs1/ kb/B05tD/3IIUnjr4tC+kkWQOhGSey+qViHGnBwUTEC9r5M9Z8HlU8jXB1z4VHYdpvqP UdK2FE5MwwDT8/xD5qRgvnfYng9DIBJEB6WndABK0edRDXHhdBfCyBRAyzA9VuwlSC/e QU8A== 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 k1si5673187qvp.106.2020.04.09.08.05.25; Thu, 09 Apr 2020 08:06:13 -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 S1727849AbgDIPDc (ORCPT + 99 others); Thu, 9 Apr 2020 11:03:32 -0400 Received: from mga01.intel.com ([192.55.52.88]:52337 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgDIPDc (ORCPT ); Thu, 9 Apr 2020 11:03:32 -0400 IronPort-SDR: annczlKFyVnqL1wSRbelpu7w/MpvLEdyS/n56wyFiuZCsNORaLiAkMVUsgfwvpPTiNChki6SpX wGn4Ht/IwhZg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 08:03:32 -0700 IronPort-SDR: 1uivUO33XXiZpc5osXMM9HihbKx8rKlq3h8GMA35BEj9CDpG/l9FMkUfzs1NB4o9VaF+pcLjod Wg43rbKGpFMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,363,1580803200"; d="scan'208";a="286914865" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by fmsmga002.fm.intel.com with ESMTP; 09 Apr 2020 08:03:32 -0700 Date: Thu, 9 Apr 2020 08:03:32 -0700 From: Ira Weiny To: Dave Chinner Cc: linux-kernel@vger.kernel.org, "Darrick J. Wong" , Dan Williams , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH V6 4/8] fs/xfs: Make DAX mount option a tri-state Message-ID: <20200409150331.GG664132@iweiny-DESK2.sc.intel.com> References: <20200407182958.568475-1-ira.weiny@intel.com> <20200407182958.568475-5-ira.weiny@intel.com> <20200407235909.GF24067@dread.disaster.area> <20200408000903.GA569068@iweiny-DESK2.sc.intel.com> <20200408004801.GH24067@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408004801.GH24067@dread.disaster.area> 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 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