linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ext4: add EXT4_IOC_GETCRTIME ioctl
@ 2008-08-06  9:09 Li Zefan
  2008-08-10  2:26 ` Theodore Tso
  0 siblings, 1 reply; 6+ messages in thread
From: Li Zefan @ 2008-08-06  9:09 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

Add EXT4_IOC_GETCRTIME ioctl, and then we can use it in
e2fsprogs.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/ext4/ext4.h  |    1 +
 fs/ext4/ioctl.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 303e41c..a487f2f 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -295,6 +295,7 @@ struct ext4_new_group_data {
 #define EXT4_IOC_GROUP_ADD		_IOW('f', 8,struct ext4_new_group_input)
 #define	EXT4_IOC_GETVERSION_OLD		FS_IOC_GETVERSION
 #define	EXT4_IOC_SETVERSION_OLD		FS_IOC_SETVERSION
+#define	EXT4_IOC_GETCRTIME		_IOR('f', 9, struct timespec)
 #ifdef CONFIG_JBD2_DEBUG
 #define EXT4_IOC_WAIT_FOR_READONLY	_IOR('f', 99, long)
 #endif
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7a6c2f1..6204b5d 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -269,6 +269,9 @@ setversion_out:
 	case EXT4_IOC_MIGRATE:
 		return ext4_ext_migrate(inode, filp, cmd, arg);
 
+	case EXT4_IOC_GETCRTIME:
+		return put_user(ei->i_crtime, (struct timespec __user *)arg);
+
 	default:
 		return -ENOTTY;
 	}
-- 
1.5.4.rc3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-18 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06  9:09 [PATCH 1/3] ext4: add EXT4_IOC_GETCRTIME ioctl Li Zefan
2008-08-10  2:26 ` Theodore Tso
2008-08-18  2:08   ` Li Zefan
2008-08-18  2:36     ` Theodore Tso
2008-08-18  9:01       ` Andreas Dilger
2008-08-18 10:03       ` Li Zefan

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).