From: Theodore Ts'o Subject: Re: [PATCH v2 2/5] ext4: prevent data corruption with journaling + DAX Date: Thu, 12 Oct 2017 11:55:22 -0400 Message-ID: <20171012155522.nqnvemlarbxxnrcw@thunk.org> References: <20170912050526.7627-1-ross.zwisler@linux.intel.com> <20170912050526.7627-3-ross.zwisler@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jan Kara , linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Dave Chinner , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andreas Dilger , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig To: Ross Zwisler Return-path: Content-Disposition: inline In-Reply-To: <20170912050526.7627-3-ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" List-Id: linux-ext4.vger.kernel.org On Mon, Sep 11, 2017 at 11:05:23PM -0600, Ross Zwisler wrote: > The current code has the potential for data corruption when changing an > inode's journaling mode, as that can result in a subsequent unsafe change > in S_DAX. > > I've captured an instance of this data corruption in the following fstest: > > https://patchwork.kernel.org/patch/9948377/ > > Prevent this data corruption from happening by disallowing changes to the > journaling mode if the '-o dax' mount option was used. This means that for > a given filesystem we could have a mix of inodes using either DAX or > data journaling, but whatever state the inodes are in will be held for the > duration of the mount. > > Signed-off-by: Ross Zwisler > Suggested-by: Jan Kara Thanks, applied. - Ted