Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460587 > unrolled thread

Re: [PATCH 2/4] befs: add check for ag_shift in superblock

Started bySalah Triki <salah.triki@gmail.com>
First post2016-08-11 17:00 +0200
Last post2016-08-11 17:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/4] befs: add check for ag_shift in superblock Salah Triki <salah.triki@gmail.com> - 2016-08-11 17:00 +0200

#1460587 — Re: [PATCH 2/4] befs: add check for ag_shift in superblock

FromSalah Triki <salah.triki@gmail.com>
Date2016-08-11 17:00 +0200
SubjectRe: [PATCH 2/4] befs: add check for ag_shift in superblock
Message-ID<s4ZCF-58o-11@gated-at.bofh.it>
On Tue, Aug 09, 2016 at 11:01:24PM +0100, Luis de Bethencourt wrote:
> ag_shift and blocks_per_ag contain the same information in different ways,
> same as block_shift and block_size do. It is worth checking this two are
> consistent, but since blocks_per_ag isn't documented as mandatory to use
> some implementations of befs don't enforce this, so making it non-fatal if
> they don't match and just having it as a warning.
> 
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
>  fs/befs/super.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/fs/befs/super.c b/fs/befs/super.c
> index dc13df8..c36745d 100644
> --- a/fs/befs/super.c
> +++ b/fs/befs/super.c
> @@ -103,6 +103,13 @@ befs_check_sb(struct super_block *sb)
>  		return BEFS_ERR;
>  	}
>  
> +
> +	/* ag_shift also encodes the same information as blocks_per_ag in a
> +	 * different way, non-fatal consistency check
> +	 */
> +	if ((1 << befs_sb->ag_shift) != befs_sb->blocks_per_ag)
> +		befs_error(sb, "ag_shift disagrees with blocks_per_ag.");
> +
>  	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 "
> -- 
> 2.5.1
> 

Signed-off-by: Salah Triki <salah.triki@gmail.com>

Thanx :)
Salah

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web