From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752919AbdJLPzb (ORCPT ); Thu, 12 Oct 2017 11:55:31 -0400 Received: from imap.thunk.org ([74.207.234.97]:40210 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbdJLPz2 (ORCPT ); Thu, 12 Oct 2017 11:55:28 -0400 Date: Thu, 12 Oct 2017 11:55:22 -0400 From: "Theodore Ts'o" To: Ross Zwisler Cc: Jan Kara , linux-kernel@vger.kernel.org, Andreas Dilger , Christoph Hellwig , Dan Williams , Dave Chinner , linux-ext4@vger.kernel.org, linux-nvdimm@lists.01.org Subject: Re: [PATCH v2 2/5] ext4: prevent data corruption with journaling + DAX Message-ID: <20171012155522.nqnvemlarbxxnrcw@thunk.org> Mail-Followup-To: Theodore Ts'o , Ross Zwisler , Jan Kara , linux-kernel@vger.kernel.org, Andreas Dilger , Christoph Hellwig , Dan Williams , Dave Chinner , linux-ext4@vger.kernel.org, linux-nvdimm@lists.01.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-Disposition: inline In-Reply-To: <20170912050526.7627-3-ross.zwisler@linux.intel.com> 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 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