53cf50e Set stat->st_dev and statfs->f_fsid

Authored and Committed by Brian Behlendorf 14 years ago
    Set stat->st_dev and statfs->f_fsid
    
    Filesystems like ZFS must use what the kernel calls an anonymous super
    block.  Basically, this is just a filesystem which is not backed by a
    single block device.  Normally this block device's dev_t is stored in
    the super block.  For anonymous super blocks a unique reserved dev_t
    is assigned as part of get_sb().
    
    This sb->s_dev must then be set in the returned stat structures as
    stat->st_dev.  This allows userspace utilities to easily detect the
    boundries of a specific filesystem.  Tools such as 'du' depend on this
    for proper accounting.
    
    Additionally, under OpenSolaris the statfs->f_fsid is set to the device
    id.  To preserve consistency with OpenSolaris we also set the fsid to
    the device id.  Other Linux filesystem (ext) set the fsid to a unique
    value determined by the filesystems uuid.  This value is unique but
    maintains no relationship to the device id.  This may be desirable
    when exporting NFS filesystem because it minimizes to chance of a
    client observing the same fsid from two different servers.
    
    Closes #140
    
        
file modified
+1 -1
file modified
+1 -1
file modified
+1 -1