NetBSD-Bugs archive

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

kern/40686: the SBSIZE mentioned in comments of sys/ufs/ffs/fs.h is out of date



>Number:         40686
>Category:       kern
>Synopsis:       the SBSIZE mentioned in comments of sys/ufs/ffs/fs.h is out of 
>date
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 19 03:25:00 +0000 2009
>Originator:     Gao Ya'nan
>Release:        NetBSD-current and NetBSD-4.0
>Organization:
>Environment:
NetBSD abutter.foo.org 4.0 NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:20:10 PST 
2007  
builds@wb34:/home/builds/ab/netbsd-4-0-RELEASE/i386/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/i386/compile/GENERIC
 i386
>Description:
The comment about MINBSIZE mentions SBSIZE, but the SBSIZE has gone and only 
are available in some definations in userland header files.

Actually the SBLOCKSIZE means the size of superblock.

And I also adopt some comments besides, please check it if you like.
>How-To-Repeat:
Review the code
>Fix:
--- fs.orig.h   2008-07-31 16:49:48.000000000 +0800
+++ fs.h        2009-02-19 10:51:26.000000000 +0800
@@ -52,7 +52,7 @@
  *     [fs->fs_cblkno]         Cylinder group block
  *     [fs->fs_iblkno]         Inode blocks
  *     [fs->fs_dblkno]         Data blocks
- * The beginning of cylinder group cg in fs, is given by
+ * The beginning of cylinder group (cg) in fs, is given by
  * the ``cgbase(fs, cg)'' macro.
  *
  * Depending on the architecture and the media, the superblock may
@@ -78,9 +78,9 @@
  * with 64k blocks is at 64k - just where the code looks first when playing
  * 'hunt the superblock'.
  *
- * The ffsv2 superblock layout (which might contain an ffsv1 filesystem)
+ * The FFSv2 superblock layout (which might contain an FFSv1 filesystem)
  * can be detected by checking for sb->fs_old_flags & FS_FLAGS_UPDATED.
- * This is the default suberblock type for NetBSD since ffsv2 support was 
added.
+ * This is the default suberblock type for NetBSD since FFSv2 support was 
added.
  */
 #define        BBSIZE          8192
 #define        BBOFF           ((off_t)(0))
@@ -92,7 +92,7 @@
 #define        SBLOCK_PIGGY  262144
 #define        SBLOCKSIZE      8192
 /*
- * NB: Do not, under any circumstances, look for an ffsv1 filesystem at
+ * NB: Do not, under any circumstances, look for an FFSv1 filesystem at
  * SBLOCK_UFS2.  Doing so will find the wrong superblock for filesystems
  * with a 64k block size.
  */
@@ -130,9 +130,9 @@
  * In order to insure that it is possible to create files of size
  * 2^32 with only two levels of indirection, MINBSIZE is set to 4096.
  * MINBSIZE must be big enough to hold a cylinder group block,
- * thus changes to (struct cg) must keep its size within MINBSIZE.
- * Note that super blocks are always of size SBSIZE,
- * and that both SBSIZE and MAXBSIZE must be >= MINBSIZE.
+ * thus changes to struct cg must keep its size within MINBSIZE.
+ * Note that super blocks are always of size SBLOCKSIZE,
+ * and that both SBLOCKSIZE and MAXBSIZE must be >= MINBSIZE.
  */
 #define        MINBSIZE        4096
 
@@ -146,7 +146,7 @@
 /*
  * The volume name for this filesystem is maintained in fs_volname.
  * MAXVOLLEN defines the length of the buffer allocated.
- * This space used to be part of of fs_fsmnt.
+ * This space used to be part of fs_fsmnt.
  */
 #define        MAXVOLLEN       32
 
@@ -247,7 +247,7 @@
 
 
 /*
- * Super block for an FFS file system in memory.
+ * Super-block for an FFS file system in memory.
  */
 struct fs {
        int32_t  fs_firstfield;         /* historic file system linked list, */



Home | Main Index | Thread Index | Old Index