NetBSD-Bugs archive

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

bin/44177: resize_ffs(8) produces unclean ffsv1 when shrinking



>Number:         44177
>Category:       bin
>Synopsis:       resize_ffs(8) produces unclean ffsv1 when shrinking
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 30 19:55:00 +0000 2010
>Originator:     riz%netbsd.org@localhost
>Release:        NetBSD 5.99.40
>Organization:
        
>Environment:
NetBSD netbsd6 5.99.40 NetBSD 5.99.40 (GENERIC) #1: Sat Nov 27 16:16:54 PST 
2010  
riz%hack.lan@localhost:/Users/riz/Documents/code/netbsd/obj/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: amd64
Machine: amd64
>Description:
        For a simple ffvs1 file system (also for more complex ones, but
there may be other problems lurking there), shrinking the file system
results in a file system that fsck has to fix DESPITE being marked as clean.
>How-To-Repeat:
        Create a new ffsv1 of any size, shrink it, and run the result
through fsck -f.  Like so:

# cat >/tmp/disktab <<EOF
floppy288|2.88MB 3.5in Extra High Density Floppy:\
        :ty=floppy:se#512:nt#2:rm#300:ns#36:nc#80:\
        :pa#5760:oa#0:ba#4096:fa#512:ta=4.2BSD:\
        :pb#5760:ob#0:\
        :pc#5760:oc#0:
EOF
# dd if=/dev/zero of=/tmp/floppy.img count=5760
5760+0 records in
5760+0 records out
2949120 bytes transferred in 0.145 secs (20338758 bytes/sec)
# vnconfig -c vnd0 /tmp/floppy.img
# disklabel -f /tmp/disktab -rw vnd0 floppy288
# newfs -V1 /dev/rvnd0a
/dev/rvnd0a: 2.8MB (5760 sectors) block size 4096, fragment size 512
        using 4 cylinder groups of 0.70MB, 180 blks, 352 inodes.
# resize_ffs -s 3000 -y /dev/rvnd0a
# fsck -f -n /dev/rvnd0a
** /dev/rvnd0a (NO WRITE)
** File system is already clean
** Last Mounted on 
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? no

SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

1 files, 1 used, 1303 free (15 frags, 161 blocks, 0.6% fragmentation)

***** UNRESOLVED INCONSISTENCIES REMAIN *****
#

>Fix:
        None given.



Home | Main Index | Thread Index | Old Index