[Midnightbsd-cvs] src [9491] trunk/sys/fs/ext2fs: ext2fs: update Block Group Descriptor struct plus cosmetic fixes.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Mar 5 15:14:50 EST 2017


Revision: 9491
          http://svnweb.midnightbsd.org/src/?rev=9491
Author:   laffer1
Date:     2017-03-05 15:14:50 -0500 (Sun, 05 Mar 2017)
Log Message:
-----------
ext2fs: update Block Group Descriptor struct plus cosmetic fixes.

Modified Paths:
--------------
    trunk/sys/fs/ext2fs/ext2_bmap.c
    trunk/sys/fs/ext2fs/ext2_dinode.h
    trunk/sys/fs/ext2fs/ext2_inode_cnv.c
    trunk/sys/fs/ext2fs/ext2fs.h

Modified: trunk/sys/fs/ext2fs/ext2_bmap.c
===================================================================
--- trunk/sys/fs/ext2fs/ext2_bmap.c	2017-03-05 20:14:27 UTC (rev 9490)
+++ trunk/sys/fs/ext2fs/ext2_bmap.c	2017-03-05 20:14:50 UTC (rev 9491)
@@ -47,8 +47,8 @@
 
 #include <fs/ext2fs/inode.h>
 #include <fs/ext2fs/ext2fs.h>
+#include <fs/ext2fs/ext2_extern.h>
 #include <fs/ext2fs/ext2_mount.h>
-#include <fs/ext2fs/ext2_extern.h>
 
 /*
  * Bmap converts the logical block number of a file to its physical block

Modified: trunk/sys/fs/ext2fs/ext2_dinode.h
===================================================================
--- trunk/sys/fs/ext2fs/ext2_dinode.h	2017-03-05 20:14:27 UTC (rev 9490)
+++ trunk/sys/fs/ext2fs/ext2_dinode.h	2017-03-05 20:14:50 UTC (rev 9491)
@@ -77,7 +77,8 @@
 #define EXT3_EPOCH_MASK	((1 << EXT3_EPOCH_BITS) - 1)
 #define EXT3_NSEC_MASK	(~0UL << EXT3_EPOCH_BITS)
 
-#define E2DI_HAS_XTIME(ip)	(EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs, EXT2F_ROCOMPAT_EXTRA_ISIZE))
+#define E2DI_HAS_XTIME(ip)	(EXT2_HAS_RO_COMPAT_FEATURE(ip->i_e2fs,	\
+				    EXT2F_ROCOMPAT_EXTRA_ISIZE))
 
 /*
  * Structure of an inode on the disk

Modified: trunk/sys/fs/ext2fs/ext2_inode_cnv.c
===================================================================
--- trunk/sys/fs/ext2fs/ext2_inode_cnv.c	2017-03-05 20:14:27 UTC (rev 9490)
+++ trunk/sys/fs/ext2fs/ext2_inode_cnv.c	2017-03-05 20:14:50 UTC (rev 9491)
@@ -115,7 +115,7 @@
 	int i;
 
 	ei->e2di_mode = ip->i_mode;
-        ei->e2di_nlink = ip->i_nlink;
+	ei->e2di_nlink = ip->i_nlink;
 	/* 
 	   Godmar thinks: if dtime is nonzero, ext2 says this inode
 	   has been deleted, this would correspond to a zero link count

Modified: trunk/sys/fs/ext2fs/ext2fs.h
===================================================================
--- trunk/sys/fs/ext2fs/ext2fs.h	2017-03-05 20:14:27 UTC (rev 9490)
+++ trunk/sys/fs/ext2fs/ext2fs.h	2017-03-05 20:14:50 UTC (rev 9491)
@@ -281,9 +281,13 @@
 	uint32_t ext2bgd_i_tables;	/* inodes table block  */
 	uint16_t ext2bgd_nbfree;	/* number of free blocks */
 	uint16_t ext2bgd_nifree;	/* number of free inodes */
-	uint16_t ext2bgd_ndirs;	/* number of directories */
-	uint16_t reserved;
-	uint32_t reserved2[3];
+	uint16_t ext2bgd_ndirs;		/* number of directories */
+	uint16_t ext2bgd_flags;		/* block group flags */
+	uint32_t ext2bgd_x_bitmap;	/* snapshot exclusion bitmap loc. */
+	uint16_t ext2bgd_b_bmap_csum;	/* block bitmap checksum */
+	uint16_t ext2bgd_i_bmap_csum;	/* inode bitmap checksum */
+	uint16_t ext2bgd_i_unused;	/* unused inode count */
+	uint16_t ext2bgd_csum;		/* group descriptor checksum */
 };
 
 /* cluster summary information */



More information about the Midnightbsd-cvs mailing list