Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Oct 1998 15:39:17 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, jkh@FreeBSD.ORG
Subject:   Re: cvs commit: src/sbin/newfs newfs.c
Message-ID:  <199810170539.PAA02786@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  Modified files:
>    sbin/newfs           newfs.c 
>  Log:
>  Don't rewrite the disk label.  The type field is already set correctly
>  and we don't use the frags info, so why bother?

Wrong.  The type field isn't already set correctly (any previous setting
according to disktab, etc., is wrong until newfs actually writes a partition.
The frags info is used by fsck(8) to recover alternate superblocks.  You
just broke fsck again.  See rev.1.9 for previous breakage, PR2537 for
problems related to this breakage, and rev.1.22 for the previous fix.

>  More to the point, it
>  seems to result in an EXDEV error when the label is written out and we
>  lose because of it (don't know why though).  This is a work-around and
>  is marked as such.

EXDEV is overloaded.  disklabel(8) translates it to

    "labeled partition or `a' partition must start at beginning of disk"

but newfs(8) is too primitive to do this translation.  It probably doesn't
expect any errors after it makes minor changes to a known-good partition
table.

Bruce

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



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