Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 00:25:04 +0900
From:      qhwt@myrealbox.com
To:        Poul-Henning Kamp <phk@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: HEADSUP:  UFS2 patch coming...
Message-ID:  <20020619152504.GB809.qhwt@myrealbox.com>
In-Reply-To: <34805.1024474049@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 19, 2002 at 10:07:29AM +0200, Poul-Henning Kamp wrote:
> 
> Kirk is loading and aiming is committatron with the UFS2 patch,
> expect to see it hit -current any day soon.

newfs doesn't work well with swap-backed filesystem:

# mdconfig -at swap -s 256M -u 1
# disklabel -rw md1 auto
# newfs /dev/md1c
Extent size set to 16384
/dev/md1c: 256.0MB (524288 sectors) block size 16384, fragment size 4096
        using 4 cylinder groups of 64.02MB, 4097 blks, 4224 inodes.
super-block backups (for fsck -b #) at:
 32, 131136, 262240, 393344
write error: 8
newfs: wtfs: Read-only file system
# /sbin.pre-ufs2/newfs /dev/md1c
/dev/md1c:      524288 sectors in 16 cylinders of 1 tracks, 32768 sectors
        256.0MB in 1 cyl groups (21 c/g, 336.00MB/g, 16384 i/g)
super-block backups (for fsck -b #) at:
 32


If I comment out the following part of mkfs.c, newfs doesn't fail.

@@ -535,12 +416,29 @@
        if (Nflag)
                exit(0);
        /*
+        * Zero out the boot area to avoid old superblocks from being
+        * found by mistake. Skip over the disklabel area.
+        */
+       bzero(iobuf, sblock.fs_bsize);
+       for (i = 1; i < sblock.fs_sblkno; i += sblock.fs_frag)
+               wtfs(fsbtodb(&sblock, i), sblock.fs_bsize, iobuf);
+       /*
         * Now construct the initial filesystem,
         * then write out the super-block.
         */



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020619152504.GB809.qhwt>