summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-02-06 16:58:56 +0000
committerpfg <pfg@FreeBSD.org>2016-02-06 16:58:56 +0000
commit4ef5827b6250178df59526f9bdcffe2704998fc4 (patch)
tree8886848dc5c091663f9d9209e806a8d59cecb1bd /sys/fs
parent28ae8dc6dd1a3a865bee71fc2a1747316fab30f8 (diff)
downloadFreeBSD-src-4ef5827b6250178df59526f9bdcffe2704998fc4.zip
FreeBSD-src-4ef5827b6250178df59526f9bdcffe2704998fc4.tar.gz
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 Approved by: re
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/ext2fs/ext2_inode_cnv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c
index 9b1b0ad..b69d4e5 100644
--- a/sys/fs/ext2fs/ext2_inode_cnv.c
+++ b/sys/fs/ext2fs/ext2_inode_cnv.c
@@ -149,11 +149,13 @@ ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei)
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;
OpenPOWER on IntegriCloud