Subject: Re: Minimum swap size
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 05/21/2003 02:35:52
On Tue, May 20, 2003 at 02:28:20PM -0400, der Mouse wrote:
> >> [fsck]
> > You should then be able to (for each cylinder group):
> > - traverse the inode array and remember the blocks that are
> > a) directories
> > b) allocation maps
> > - traverse the directory blocks to check the reference counts
> > - traverse the alocation maps to find further maps and allocated blocks
>
> Not quite.
>
> Inodes may refer to blocks that are in other cylinder groups. This
> means that you can't know, before having scanned all cgs, which blocks
> in the current cg should be allocated, much less which ones belong to
> directories.
Indeed, you need a global block alloaction map, but the rest of the
work can be done cylinder group by cylinder group.
David
--
David Laight: david@l8s.co.uk