Re: [git pull] first batch of ufs fixes

From: Richard Narron
Date: Mon Jun 12 2017 - 20:54:17 EST


On Mon, 12 Jun 2017, Al Viro wrote:

On Sun, Jun 11, 2017 at 12:47:40PM -0700, Richard Narron wrote:
1) Creating an OpenBSD 6.1 (44bsd) disk and then on Linux copying a large >
2GB file and creating a directory, there are errors on OpenBSD
with the fsck:


Can't reproduce...
# fsck -f /dev/rwd1c
** /dev/rwd1c
** 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
3 files, 1573258 used, 489445 free (13 frags, 61179 blocks, 0.0% fragmentation)
# uname -mrsv
OpenBSD 6.1 GENERIC#19 amd64
# file -s /dev/rwd1c
/dev/rwd1c: Unix Fast File system [v1] (little-endian), last mounted on , last written at Mon Jun 12 06:03:57 2017, clean flag 1, number of blocks 2097152, number of data blocks 2062703, number of cylinder groups 21, block size 16384, fragment size 2048, minimum percentage of free blocks 5, rotational delay 0ms, disk rotational speed 60rps, TIME optimization

That's after
# mkdir /mnt/a; dd if=/dev/zero of=/mnt/a/foo bs=1M count=3072
on the Linux side, with
root@kvm1:~# uname -msrv
Linux 4.12.0-rc1+ #112 SMP Fri Jun 9 17:16:00 EDT 2017 x86_64
there. -o loop mount on Linux (image living on 9p), direct -hdb ../9p/ufs on OpenBSD side
of things (both in KVM on the same host)...

Earlier today I could not reproduce the OpenBSD 6.1 ufs1 fsck error after Linux 4.12-rc5 copy of my >2GB file using "cp".

But later today I get the error when I copy using your "dd" method...

In any case I always get a ufs1 fsck error after the Linux rm and rmdir.

Here is the error after rm of the files created by the "dd" method:

#/usr/bin/uname -mrsv
OpenBSD 6.1 GENERIC.MP#6 amd64
#/sbin/fsck -n -f /dev/sd0e
** /dev/rsd0e (NO WRITE)
** File system is already clean
** Last Mounted on /diske
** 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

1 files, 1 used, 6682349 free (13 frags, 835292 blocks, 0.0% fragmentation)
#/sbin/fsck -f /dev/sd0e
** /dev/rsd0e
** File system is already clean
** Last Mounted on /diske
** 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? [Fyn?]
1 files, 1 used, 8255606 free (14 frags, 1031949 blocks, 0.0% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****
#/sbin/mount /dev/sd0e
#/bin/df /diske
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/sd0e 33022428 4 31371304 0% /diske
#/sbin/mount /dev/sd0e
#/bin/df /diske
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/sd0e 33022428 4 31371304 0% /diske

OpenBSD 6.1 is not very stable for me.

I will test FreeBSD and NetBSD ufs1 to see if they have a problem...