From owner-svn-src-stable@FreeBSD.ORG Sat Feb 11 20:01:04 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86C99106564A; Sat, 11 Feb 2012 20:01:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 701B68FC08; Sat, 11 Feb 2012 20:01:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1BK142U045661; Sat, 11 Feb 2012 20:01:04 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1BK14jh045657; Sat, 11 Feb 2012 20:01:04 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201202112001.q1BK14jh045657@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 11 Feb 2012 20:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231528 - stable/9/sys/fs/ext2fs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 20:01:04 -0000 Author: pfg Date: Sat Feb 11 20:01:03 2012 New Revision: 231528 URL: http://svn.freebsd.org/changeset/base/231528 Log: MFC: r231168 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. This is a prerequisite for new features that will be coming in the future. Approved by: jhb (mentor) Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h stable/9/sys/fs/ext2fs/ext2fs.h stable/9/sys/fs/ext2fs/inode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Sat Feb 11 19:41:56 2012 (r231527) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Sat Feb 11 20:01:03 2012 (r231528) @@ -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: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Sat Feb 11 19:41:56 2012 (r231527) +++ stable/9/sys/fs/ext2fs/ext2fs.h Sat Feb 11 20:01:03 2012 (r231528) @@ -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: stable/9/sys/fs/ext2fs/inode.h ============================================================================== --- stable/9/sys/fs/ext2fs/inode.h Sat Feb 11 19:41:56 2012 (r231527) +++ stable/9/sys/fs/ext2fs/inode.h Sat Feb 11 20:01:03 2012 (r231528) @@ -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). */