From owner-freebsd-fs@FreeBSD.ORG Fri May 9 15:31:33 2003 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 082C837B401 for ; Fri, 9 May 2003 15:31:33 -0700 (PDT) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3EDF43FAF for ; Fri, 9 May 2003 15:31:31 -0700 (PDT) (envelope-from l.ertl@univie.ac.at) Received: from dialin202.cc.univie.ac.at (dialin202.cc.univie.ac.at [131.130.202.202]) by mailbox.univie.ac.at (8.12.2/8.12.2) with ESMTP id h49MVKc9044600; Sat, 10 May 2003 00:31:24 +0200 Date: Sat, 10 May 2003 00:31:15 +0200 (CEST) From: Lukas Ertl To: Poul-Henning Kamp In-Reply-To: <15149.1052518679@critter.freebsd.dk> Message-ID: <20030510002107.T638@korben.in.tern> References: <15149.1052518679@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-DCC-ZID-Univie-Metrics: mailbox 4251; Body=2 Fuz1=2 Fuz2=2 cc: freebsd-fs@freebsd.org Subject: Re: newfs: useless/bogus check if new last block can be accessed? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2003 22:31:33 -0000 On Sat, 10 May 2003, Poul-Henning Kamp wrote: > In message <20030510000438.Y638@korben.in.tern>, Lukas Ertl writes: > > >> 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? > > If the check still works, I'd tend to keep it on the basis that it > does no harm, but if you tell me that it would never result in an > error, then we might as well remove it. I don't think it does any harm to keep it (WRT to getting a working filesystem), but since I don't see how it would signal an error (and this is why I posted the question) I'd vote for removing the check. And while we're here: shouldn't wtfs() actually give a return value and not be just static void? (In terms of: "be a good programmer and check the return values of your syscalls...") I think it's called often enough in newfs to qualify for a check :-) 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/