From owner-freebsd-current Wed Jun 19 8:24:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by hub.freebsd.org (Postfix) with ESMTP id DDF5437B408; Wed, 19 Jun 2002 08:24:31 -0700 (PDT) Received: from localhost qhwt@smtp-send.myrealbox.com [61.205.107.122] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 3.9 $ on Novell NetWare; Wed, 19 Jun 2002 09:24:32 -0600 Date: Thu, 20 Jun 2002 00:25:04 +0900 From: qhwt@myrealbox.com To: Poul-Henning Kamp Cc: current@freebsd.org Subject: Re: HEADSUP: UFS2 patch coming... Message-ID: <20020619152504.GB809.qhwt@myrealbox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34805.1024474049@critter.freebsd.dk> User-Agent: Mutt/1.5.1i X-Dispatcher: imput version 20000228(IM140) Lines: 42 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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