Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 2003 23:04:38 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        cvs-all@freebsd.org, cvs-committers@freebsd.org
Subject:   Re: cvs commit: src/lib/libufs sblock.c
Message-ID:  <20030126230438.A39273@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0301262236000.84307-100000@root.org>; from nate@root.org on Sun, Jan 26, 2003 at 10:40:40PM -0800
References:  <20030127015719.C98C937B4B6@hub.freebsd.org> <Pine.BSF.4.21.0301262236000.84307-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* De: Nate Lawson <nate@root.org> [ Data: 2003-01-26 ]
	[ Subjecte: Re: cvs commit: src/lib/libufs sblock.c ]
> On Sun, 26 Jan 2003, Juli Mallett wrote:
> > jmallett    2003/01/26 17:57:15 PST
> > 
> >   Modified files:
> >     lib/libufs           sblock.c 
> >   Log:
> >   If we don't know where the sblock is (e.g. filling out a blank disk), then
> >   get it from the fs structure.  
> >
> > +	if (!disk->d_sblock) {
> > +		disk->d_sblock = disk->d_fs.fs_sblockloc / disk->d_bsize;
> > +	}
> 
> Please fix this for the "new" way where sblockloc is in bytes, not blocks.  
> For information on how to parse it, check sys/ufs/ffs/ffs_vfsops.c in
> ffs_oldfscompat*().  There are a couple of stages a sb can currently be
> in, based on when the fs was created.

disk->d_bsize is 1 when the filesystem is in bytes, for newfs, it's sectors.
-- 
Juli Mallett <jmallett@FreeBSD.org>
AIM: BSDFlata -- IRC: juli on EFnet.
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.

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?20030126230438.A39273>