From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932742AbcHIMlV (ORCPT ); Tue, 9 Aug 2016 08:41:21 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:34951 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932532AbcHIMlM (ORCPT ); Tue, 9 Aug 2016 08:41:12 -0400 Subject: Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state To: Salah Triki , akpm@linux-foundation.org, viro@zeniv.linux.org.uk References: <9f647c2c2067379143fe85dfcb94842dbed0a97e.1470745951.git.salah.triki@gmail.com> <03eea80e0188d9cab423cf517659280afd04d7b2.1470745951.git.salah.triki@gmail.com> Cc: linux-kernel@vger.kernel.org From: Luis de Bethencourt Message-ID: Date: Tue, 9 Aug 2016 13:40:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <03eea80e0188d9cab423cf517659280afd04d7b2.1470745951.git.salah.triki@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/16 13:32, Salah Triki wrote: > flags field records the superblock state, so check if it is equal to > BEFS_DIRTY. > > Signed-off-by: Salah Triki > --- > fs/befs/super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/befs/super.c b/fs/befs/super.c > index 5ab75e8..79be409 100644 > --- a/fs/befs/super.c > +++ b/fs/befs/super.c > @@ -103,7 +103,7 @@ befs_check_sb(struct super_block *sb) > return BEFS_ERR; > } > > - if (befs_sb->log_start != befs_sb->log_end) { > + if (befs_sb->log_start != befs_sb->log_end || befs_sb->flags == BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > "journal. You must boot into BeOS and mount this volume " > "to make it clean."); > Hi Salah, Looks like a good idea. Any reason why commit 1/2, where you add the flag, and commit 2/2, where you read it, are split and not in the same commit? Curious. Will test it soon. Thanks :) Luis