NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/39264: newfs can create a filesystem with > 2^31 inodes



The following reply was made to PR bin/39264; it has been noted by GNATS.

From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/39264: newfs can create a filesystem with > 2^31 inodes
Date: Mon, 4 Aug 2008 22:30:28 +0100

 On Fri, Aug 01, 2008 at 03:55:01PM +0000, Simon Burge wrote:
 > >Number:         39264
 > >Synopsis:       newfs can create a filesystem with > 2^31 inodes
 ...
 >      Newfs can create a filesystem with > 2^31 inodes, despite this
 >      comment in mkfs.c:
 ...
 >      Not sure.  We're overflowing with:
 >              inodes_per_cg = ((inodeblks - 1) / ncg + 1) * INOPB(&sblock);
 >
 >      I'm not sure of the logic for the -1/+1 here.
 ...
 It is there to round up the division.
 The same as (inodeblks + (ncg - 1)) / ncg would do.
 If you have asked newfs to create a filesystem with a specific number of
 inodes then it is needed in order to get at least the required number.
 
        David
 
 -- 
 David Laight: david%l8s.co.uk@localhost
 


Home | Main Index | Thread Index | Old Index