Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Feb 2012 22:31:28 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r231168 - head/sys/fs/ext2fs
Message-ID:  <201202072231.q17MVSc6010455@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Feb  7 22:31:28 2012
New Revision: 231168
URL: http://svn.freebsd.org/changeset/base/231168

Log:
  Update the data structures with some fields reserved for
  ext4 but that can be used in ext3 mode.
  
  Also adjust the internal inode to carry the birthtime,
  like in UFS, which is starting to get some use when
  big inodes are available.
  
  Right now these are just placeholders for features
  to come.
  
  Approved by:	jhb (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/fs/ext2fs/ext2_dinode.h
  head/sys/fs/ext2fs/ext2fs.h
  head/sys/fs/ext2fs/inode.h

Modified: head/sys/fs/ext2fs/ext2_dinode.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_dinode.h	Tue Feb  7 22:31:16 2012	(r231167)
+++ head/sys/fs/ext2fs/ext2_dinode.h	Tue Feb  7 22:31:28 2012	(r231168)
@@ -70,7 +70,7 @@ struct ext2fs_dinode {
 	uint16_t	e2di_uid;	/*   2: Owner UID */
 	uint32_t	e2di_size;	/*	 4: Size (in bytes) */
 	uint32_t	e2di_atime;	/*	 8: Access time */
-	uint32_t	e2di_ctime;	/*	12: Create time */
+	uint32_t	e2di_ctime;	/*	12: Change time */
 	uint32_t	e2di_mtime;	/*	16: Modification time */
 	uint32_t	e2di_dtime;	/*	20: Deletion time */
 	uint16_t	e2di_gid;	/*  24: Owner GID */
@@ -89,6 +89,8 @@ struct ext2fs_dinode {
 	uint16_t	e2di_uid_high;	/* 120: Owner UID top 16 bits */
 	uint16_t	e2di_gid_high;	/* 122: Owner GID top 16 bits */
 	uint32_t	e2di_linux_reserved3; /* 124 */
+	uint16_t	e2di_extra_isize;
+	uint16_t	e2di_pad1;
 };
 
 #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */

Modified: head/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- head/sys/fs/ext2fs/ext2fs.h	Tue Feb  7 22:31:16 2012	(r231167)
+++ head/sys/fs/ext2fs/ext2fs.h	Tue Feb  7 22:31:28 2012	(r231168)
@@ -123,7 +123,22 @@ struct ext2fs {
 	char      e3fs_reserved_char_pad;
 	uint32_t  e3fs_default_mount_opts;
 	uint32_t  e3fs_first_meta_bg;	/* First metablock block group */
-	uint32_t  reserved2[190];	/* Padding to the end of the block */
+	uint32_t  e3fs_mkfs_time;      /* when the fs was created */
+	uint32_t  e3fs_jnl_blks[17];   /* backup of the journal inode */
+	uint32_t  e4fs_bcount_hi;      /* block count */
+	uint32_t  e4fs_rbcount_hi;     /* reserved blocks count */
+	uint32_t  e4fs_fbcount_hi;     /* free blocks count */
+	uint16_t  e4fs_min_extra_isize;/* all inodes have at least some bytes */
+	uint16_t  e4fs_want_extra_isize; /* new inodes should reserve some bytes */
+	uint32_t  e4fs_flags;	  /* miscellaneous flags */
+	uint16_t  e4fs_raid_stride;    /* RAID stride */
+	uint16_t  e4fs_mmpintv;	/* number of seconds to wait in MMP checking */
+	uint64_t  e4fs_mmpblk;	 /* block for multi-mount protection */
+	uint32_t  e4fs_raid_stripe_wid;/* blocks on all data disks (N * stride) */
+	uint8_t   e4fs_log_gpf;	/* FLEX_BG group size */ 
+	uint8_t   e4fs_char_pad2;
+	uint16_t  e4fs_pad;
+	uint32_t  reserved2[162];	/* Padding to the end of the block */	
 };
 
 
@@ -139,15 +154,15 @@ struct m_ext2fs {
 	uint32_t e2fs_bsize;      /* Block size */
 	uint32_t e2fs_bshift;     /* calc of logical block no */
 	int32_t  e2fs_bmask;      /* calc of block offset */
-	int32_t  e2fs_bpg;        /* Number of blocks per group */
+	int32_t  e2fs_bpg;	  /* Number of blocks per group */
 	int64_t  e2fs_qbmask;     /* = s_blocksize -1 */
 	uint32_t e2fs_fsbtodb;    /* Shift to get disk block */
-	uint32_t e2fs_ipg;        /* Number of inodes per group */
-	uint32_t e2fs_ipb;        /* Number of inodes per block */
+	uint32_t e2fs_ipg;	  /* Number of inodes per group */
+	uint32_t e2fs_ipb;	  /* Number of inodes per block */
 	uint32_t e2fs_itpg;       /* Number of inode table per group */
 	uint32_t e2fs_fsize;      /* Size of fragments per block */
-	uint32_t e2fs_fpb;        /* Number of fragments per block */
-	uint32_t e2fs_fpg;        /* Number of fragments per group */
+	uint32_t e2fs_fpb;	  /* Number of fragments per block */
+	uint32_t e2fs_fpg;	  /* Number of fragments per group */
 	uint32_t e2fs_dbpg;       /* Number of descriptor blocks per group */
 	uint32_t e2fs_descpb;     /* Number of group descriptors per block */
 	uint32_t e2fs_gdbcount;   /* Number of group descriptors */
@@ -161,7 +176,7 @@ struct m_ext2fs {
 	char     e2fs_wasvalid;   /* valid at mount time */
 	off_t    e2fs_maxfilesize;
 	struct   ext2_gd *e2fs_gd; /* Group Descriptors */
-	int32_t  e2fs_maxcontig;        /* max number of contiguous blks */
+	int32_t  e2fs_maxcontig;	/* max number of contiguous blks */
 	int32_t  e2fs_contigsumsize;    /* size of cluster summary array */
 	int32_t *e2fs_maxcluster;       /* max cluster in each cyl group */
 	struct   csum *e2fs_clustersum; /* cluster summary in each cyl group */

Modified: head/sys/fs/ext2fs/inode.h
==============================================================================
--- head/sys/fs/ext2fs/inode.h	Tue Feb  7 22:31:16 2012	(r231167)
+++ head/sys/fs/ext2fs/inode.h	Tue Feb  7 22:31:28 2012	(r231168)
@@ -85,11 +85,13 @@ struct inode {
 	int16_t		i_nlink;	/* File link count. */
 	uint64_t	i_size;		/* File byte count. */
 	int32_t		i_atime;	/* Last access time. */
-	int32_t		i_atimensec;	/* Last access time. */
 	int32_t		i_mtime;	/* Last modified time. */
-	int32_t		i_mtimensec;	/* Last modified time. */
 	int32_t		i_ctime;	/* Last inode change time. */
+	int32_t		i_birthtime;	/* Inode creation time. */
+	int32_t		i_mtimensec;	/* Last modified time. */
+	int32_t		i_atimensec;	/* Last access time. */
 	int32_t		i_ctimensec;	/* Last inode change time. */
+	int32_t		i_birthnsec;	/* Inode creation time. */
 	int32_t		i_db[NDADDR];	/* Direct disk blocks. */
 	int32_t		i_ib[NIADDR];	/* Indirect disk blocks. */
 	uint32_t	i_flags;	/* Status flags (chflags). */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202072231.q17MVSc6010455>