NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/50070: fsck OK but mount: incorrect super block



The following reply was made to PR kern/50070; it has been noted by GNATS.

From: Maxime Villard <max%m00nbsd.net@localhost>
To: Martin Husemann <martin%duskware.de@localhost>, gnats-bugs%NetBSD.org@localhost
Cc: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>,
 Maxime Villard <maxv%NetBSD.org@localhost>
Subject: Re: kern/50070: fsck OK but mount: incorrect super block
Date: Thu, 22 Oct 2015 10:24:32 +0200

 Le 22/10/2015 09:37, Martin Husemann a écrit :
 > J. Hannken-Illjes wrote:
 > 
 >>  This cgsize test from ffs_superblock_validate() is wrong.  Newfs aligns
 >>  fs_cgsize to fragment size:
 >>  
 >>  	sblock.fs_cgsize = ffs_fragroundup(&sblock, CGSIZE(&sblock));
 >>  
 
 And so does ffs_superblock_validate(), doesn't it? Can you elaborate
 a bit?
 
 >>  All we should test here is
 >>  
 >>  	fs->fs_cgsize >= sizeof(struct cg)
 >>  	fs->fs_cgsize <= fs->fs_bsize
 > 
 
 The only bug I can see currently in ffs_vfsops.c is that the superblock
 is validated before ffs_oldfscompat_read() is called, which means that
 FFSv1+!FS_FLAGS_UPDATED disks may not mount correctly. This is not the
 case in that PR, since "fslevel 4" means FFSv1+FS_FLAGS_UPDATED.
 
 > So can we fix it, please?
 
 I guess I'll have to subscribe to netbsd-bugs@.
 
 > 
 > Martin
 > 
 


Home | Main Index | Thread Index | Old Index