[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <48996A33.3010507@cn.fujitsu.com>
Date: Wed, 06 Aug 2008 17:09:07 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: "Theodore Ts'o" <tytso@....edu>
CC: linux-ext4@...r.kernel.org
Subject: [PATCH 1/3] ext4: add EXT4_IOC_GETCRTIME ioctl
Add EXT4_IOC_GETCRTIME ioctl, and then we can use it in
e2fsprogs.
Signed-off-by: Li Zefan <lizf@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists