From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=DATE_IN_PAST_12_24, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92717C43219 for ; Mon, 29 Apr 2019 11:39:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 610CE2147A for ; Mon, 29 Apr 2019 11:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727971AbfD2Ljw (ORCPT ); Mon, 29 Apr 2019 07:39:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:47594 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727872AbfD2Ljv (ORCPT ); Mon, 29 Apr 2019 07:39:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6F930AE84; Mon, 29 Apr 2019 11:39:50 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 87F711E3BFD; Sun, 28 Apr 2019 22:21:54 +0200 (CEST) Date: Sun, 28 Apr 2019 22:21:54 +0200 From: Jan Kara To: Debabrata Banerjee Cc: Theodore Ts'o , Andreas Dilger , linux-ext4@vger.kernel.org, Dmitry Monakhov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: bad mount opts in no journal mode Message-ID: <20190428202154.GE7441@quack2> References: <20190411214917.1899-1-dbanerje@akamai.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411214917.1899-1-dbanerje@akamai.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 11-04-19 17:49:17, Debabrata Banerjee wrote: > Fixes: > commit 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal") > > Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as > I assume was intended, all other options were blown away leading to > _ext4_show_options() output being incorrect. I don't see why this or > other journal related flags should be removed from s_def_mount_opt > regardless, it is only used for comparison to display opts, and we > already made sure they couldn't be set. > > Signed-off-by: Debabrata Banerjee So I agree that the clearing is wrong. But I don't agree with just deleting the line. We could have JOURNAL_CHECKSUM in s_def_mount_opt in nojournal mode and in such case we don't want to show in /proc/mounts nojournal_checksum as a mount option. So the line should be really fixed to: sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM; Honza > --- > fs/ext4/super.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 6ed4eb81e674..63eef29666e0 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -4238,7 +4238,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) > "data=, fs mounted w/o journal"); > goto failed_mount_wq; > } > - sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM; > clear_opt(sb, JOURNAL_CHECKSUM); > clear_opt(sb, DATA_FLAGS); > sbi->s_journal = NULL; > -- > 2.21.0 > -- Jan Kara SUSE Labs, CR