From patchwork Mon Oct 8 19:32:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10631365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 037D715E9 for ; Mon, 8 Oct 2018 19:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB9E429BAD for ; Mon, 8 Oct 2018 19:33:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E05EA29BB6; Mon, 8 Oct 2018 19:33:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8878229BAD for ; Mon, 8 Oct 2018 19:33:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbeJICqZ (ORCPT ); Mon, 8 Oct 2018 22:46:25 -0400 Received: from sandeen.net ([63.231.237.45]:39902 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbeJICqX (ORCPT ); Mon, 8 Oct 2018 22:46:23 -0400 Received: by sandeen.net (Postfix, from userid 500) id 3DEB722C7; Mon, 8 Oct 2018 14:32:52 -0500 (CDT) From: Eric Sandeen To: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 3/3] ext2: hard fail dax mount on unsupported devices Date: Mon, 8 Oct 2018 14:32:49 -0500 Message-Id: <1539027169-23332-4-git-send-email-sandeen@sandeen.net> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539027169-23332-1-git-send-email-sandeen@sandeen.net> References: <1539027169-23332-1-git-send-email-sandeen@sandeen.net> Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As dax inches closer to production use, an administrator should not be surprised by silently disabling the feature they asked for. Signed-off-by: Eric Sandeen --- fs/ext2/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 73bd58f..b9471c0 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -967,8 +967,8 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) if (sbi->s_mount_opt & EXT2_MOUNT_DAX) { if (!bdev_dax_supported(sb->s_bdev, blocksize)) { ext2_msg(sb, KERN_ERR, - "DAX unsupported by block device. Turning off DAX."); - sbi->s_mount_opt &= ~EXT2_MOUNT_DAX; + "DAX unsupported by block device."); + goto failed_mount; } }