tech-kern archive

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

Re: statvfs() sleeps forever on tstile



On Sun, May 08, 2011 at 07:24:10PM +0200, Emmanuel Dreyfus wrote:
> As I understand, FFS sits on top of UFS. We migrated from UFS1 to UFS2
> some time ago (remeber the thing about the superblock that was
> converted?), and now we can have FFS v1 or FFS v2 over UFS2. You choose
> FFS v2 by formatting with newfs -O 2

I think this is incorrect. The (IMHO) correct version explanation
can be found in newfs(8):

    -O filesystem-format
                 Select the filesystem-format.
                       0    4.3BSD; This option is primarily used to build
                            root file systems that can be understood by older
                            boot ROMs.
                       1    FFSv1; normal fast-filesystem (default).  This is
                            also known as `FFS', `UFS', or `UFS1'.
                       2    FFSv2; enhanced fast-filesystem (suited for more
                            than 1 Terabyte capacity, access control lists).
                            This is also known as `UFS2'.

Another part of the confusion is the superblock format, which changed at
the same time as the inode format, but you can build FFS1/UFS1 filesystems
with FFSv2 superblocks. For example this is from an i386 5.1 machine:

file system: /dev/rraid0a
endian  little-endian
magic   11954 (UFS1)    time    Sun May  8 22:40:07 2011
superblock location     8192    id      [ 40b918f4 632cf0d8 ]
cylgrp  dynamic inodes  4.4BSD  sblock  FFSv2   fslevel 4
nbfree  16189026        ndir    182278  nifree  44922709        nffree  571925

This is a FFSv1 file system (called UFS1 in the dumpfs output), but the
superblock is in FFSv2 format.

Compare to this:

file system: /dev/rwd0a
format  FFSv2
endian  little-endian
location 65536  (-b 128)
magic   19540119        time    Sun May  8 22:42:43 2011
superblock location     65536   id      [ 4c2cc116 47d65068 ]
cylgrp  dynamic inodes  FFSv2   sblock  FFSv2   fslevel 5

Here we have a FFSv2 file system, and are using the FFSv2 superblock as well.


Martin


Home | Main Index | Thread Index | Old Index