Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 2016 02:19:47 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294970 - stable/10/sys/fs/ext2fs
Message-ID:  <201601280219.u0S2Jl4t086409@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu Jan 28 02:19:47 2016
New Revision: 294970
URL: https://svnweb.freebsd.org/changeset/base/294970

Log:
  MFC	r294695:
  ext2fs: passthrough any extra timestamps to the dinode struct.
  
  In general we don't trust any of the extended timestamps unless the
  EXT2F_ROCOMPAT_EXTRA_ISIZE feature is set. However, in the case where
  we freshly allocated a new inode the information is valid and it is
  better to pass it along instead of leaving the value undefined.
  
  This should have no practical effect but should reduce the amount of
  garbage if EXT2F_ROCOMPAT_EXTRA_ISIZE is set, like in cases where the
  filesystem is converted from ext3 to ext4.

Modified:
  stable/10/sys/fs/ext2fs/ext2_inode_cnv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/ext2fs/ext2_inode_cnv.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_inode_cnv.c	Thu Jan 28 01:45:15 2016	(r294969)
+++ stable/10/sys/fs/ext2fs/ext2_inode_cnv.c	Thu Jan 28 02:19:47 2016	(r294970)
@@ -149,13 +149,11 @@ ext2_i2ei(struct inode *ip, struct ext2f
 	ei->e2di_atime = ip->i_atime;
 	ei->e2di_mtime = ip->i_mtime;
 	ei->e2di_ctime = ip->i_ctime;
-	if (E2DI_HAS_XTIME(ip)) {
-		ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
-		ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
-		ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
-		ei->e2di_crtime = ip->i_birthtime;
-		ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
-	}
+	ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec);
+	ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec);
+	ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec);
+	ei->e2di_crtime = ip->i_birthtime;
+	ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec);
 	ei->e2di_flags = 0;
 	ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0;
 	ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0;



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