Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 2003 00:07:26 +0200 (CEST)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: newfs: useless/bogus check if new last block can be accessed? 
Message-ID:  <20030510000438.Y638@korben.in.tern>
In-Reply-To: <14820.1052517474@critter.freebsd.dk>
References:  <14820.1052517474@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Poul,

On Fri, 9 May 2003, Poul-Henning Kamp wrote:

> In message <20030509234356.T638@korben.in.tern>, Lukas Ertl writes:
> >
> >wtfs() is of type static void, and just calls bwrite() from libufs,
> >ignoring its return value.
>
> In the good old days, people could write any damn number they wanted in
> a disklabel, and the kernel would let them.
>
> This check tried to make sure that the partition length picked up from
> the disklabel, or entered as an argument actually makes sense as far
> as you can actually write to the last sector.

Ok, I see, thanks for the history lesson :-)

> I'm not sure if this particular bit does anything at this point in
> time, we may have caught the issue earlier in the process, because
> today disk devices actually know how large they are.
>
> [...]
>
> syv# newfs -s 2049 md5
> newfs: /dev/md5: maximum file system size is 2048
> syv#

But since this size check comes much earlier in the code, I guess the
wtfs() call is useless and should be removed, shouldn't it?

regards,
le

--=20
Lukas Ertl                             eMail: l.ertl@univie.ac.at
UNIX-Systemadministrator               Tel.:  (+43 1) 4277-14073
Zentraler Informatikdienst (ZID)       Fax.:  (+43 1) 4277-9140
der Universit=E4t Wien                   http://mailbox.univie.ac.at/~le/



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