svn commit: r295354 - stable/9/sys/fs/ext2fs

Pedro F. Giffuni pfg at FreeBSD.org
Sat Feb 6 17:10:48 UTC 2016


Author: pfg
Date: Sat Feb  6 17:10:46 2016
New Revision: 295354
URL: https://svnweb.freebsd.org/changeset/base/295354

Log:
  MFC r295209;
  Revert r294695; passthrough any extra timestamps to the dinode struct.
  
  The original ext2fs change worked fine on disks formated with default
  values, but it was the cause of a regression when inodes are small.
  Revert it for now, while we figure out safer ways pass such values,
  
  PR:		206820

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

Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c	Sat Feb  6 16:58:56 2016	(r295353)
+++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c	Sat Feb  6 17:10:46 2016	(r295354)
@@ -149,11 +149,13 @@ 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;
-	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);
+	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_flags = 0;
 	ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0;
 	ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0;


More information about the svn-src-stable-9 mailing list