From: Li Zefan <lizf@cn.fujitsu.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH][e2fsprogs] fix 0 file creation time
Date: Wed, 06 Aug 2008 17:09:19 +0800 [thread overview]
Message-ID: <48996A3F.3050607@cn.fujitsu.com> (raw)
$ lsattr -c
1970-01-01 08:00:00.0 +0800 --------------- ./lost+found
It turns out that the crtime of files created by e2fsprogs is 0.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
lib/ext2fs/inode.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
index ba15dda..66ddae4 100644
--- a/lib/ext2fs/inode.c
+++ b/lib/ext2fs/inode.c
@@ -767,6 +767,7 @@ errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino,
large_inode = (struct ext2_inode_large *) buf;
large_inode->i_extra_isize = sizeof(struct ext2_inode_large) -
EXT2_GOOD_OLD_INODE_SIZE;
+ large_inode->i_crtime = large_inode->i_atime;
retval = ext2fs_write_inode_full(fs, ino, buf, size);
free(buf);
--
1.5.4.rc3
next reply other threads:[~2008-08-06 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 9:09 Li Zefan [this message]
2008-08-14 18:45 ` [PATCH][e2fsprogs] fix 0 file creation time Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48996A3F.3050607@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).