Subject: kern/33112: VND_COMPRESS support broken: mount_ffs: /dev/vnd0a on /mnt: incorrect super block
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <julian@circleware.org>
List: netbsd-bugs
Date: 03/21/2006 00:25:07
>Number:         33112
>Category:       kern
>Synopsis:       VND_COMPRESS support broken: mount_ffs: /dev/vnd0a on /mnt: incorrect super block
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 21 00:25:07 +0000 2006
>Originator:     Julian Bourne
>Release:        3.99.16 (2006-03-09 daily)
>Organization:
>Environment:
NetBSD petra.eth0.circleware.org 3.99.16 NetBSD 3.99.16 (GENERIC) #0: Thu Mar  9 05:38:48 UTC 2006  builds@b4.netbsd.org:/home/builds/ab/HEAD/i386/200603090000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386

>Description:
The cloop2 compressed vnode support in vnd.c appears to have been broken by changes introduced since the beginning of the year.

In detail, the code cannot correctly read a superblock from the vnd device for a mounted filesystem which is known to be correct on a vanilla 3.0 system.

It doesn't matter if the compressed filesystem is created on 3.0 or latest.


>How-To-Repeat:
petra# makefs -t ffs /tmp/etc.fs /etc
Calculated size of `/tmp/etc.fs': 3514368 bytes, 289 inodes
Extent size set to 8192
/tmp/etc.fs: 3.4MB (6864 sectors) block size 8192, fragment size 1024
        using 1 cylinder groups of 3.35MB, 429 blks, 320 inodes.
super-block backups (for fsck -b #) at:
 32,
Populating `/tmp/etc.fs'
Image `/tmp/etc.fs' complete
petra# vndcompress /tmp/etc.fs /tmp/etc.cl2
Using blocksize: 65536 (53 complete and 1 zero-padded blocks)
petra# vnconfig -z vnd0 /tmp/etc.cl2
petra# mount /dev/vnd0a /mnt
mount_ffs: /dev/vnd0a on /mnt: incorrect super block
petra# 

>Fix: