aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorKalpak Shah <kalpak@clusterfs.com>2007-07-18 09:15:20 -0400
committerTheodore Ts'o <tytso@mit.edu>2007-07-18 09:15:20 -0400
commitef7f38359ea8b3e9c7f2cae9a4d4935f55ca9e80 (patch)
treeee34a5821332cf70b89827eb872f08bc0dd43f89 /fs/ext4/ioctl.c
parent0f49d5d019afa4e94253bfc92f0daca3badb990b (diff)
ext4: Add nanosecond timestamps
This patch adds nanosecond timestamps for ext4. This involves adding *time_extra fields to the ext4_inode to extend the timestamps to 64-bits. Creation time is also added by this patch. These extended fields will fit into an inode if the filesystem was formatted with large inodes (-I 256 or larger) and there are currently no EAs consuming all of the available space. For new inodes we always reserve enough space for the kernel's known extended fields, but for inodes created with an old kernel this might not have been the case. So this patch also adds the EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE feature flag(ro-compat so that older kernels can't create inodes with a smaller extra_isize). which indicates if the fields fitting inside s_min_extra_isize are available or not. If the expansion of inodes if unsuccessful then this feature will be disabled. This feature is only enabled if requested by the sysadmin. None of the extended inode fields is critical for correct filesystem operation. Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: Kalpak Shah <kalpak@clusterfs.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 5b00775d5096..c04c7ccba9e3 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -97,7 +97,7 @@ int ext4_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
97 ei->i_flags = flags; 97 ei->i_flags = flags;
98 98
99 ext4_set_inode_flags(inode); 99 ext4_set_inode_flags(inode);
100 inode->i_ctime = CURRENT_TIME_SEC; 100 inode->i_ctime = ext4_current_time(inode);
101 101
102 err = ext4_mark_iloc_dirty(handle, inode, &iloc); 102 err = ext4_mark_iloc_dirty(handle, inode, &iloc);
103flags_err: 103flags_err:
@@ -134,7 +134,7 @@ flags_err:
134 return PTR_ERR(handle); 134 return PTR_ERR(handle);
135 err = ext4_reserve_inode_write(handle, inode, &iloc); 135 err = ext4_reserve_inode_write(handle, inode, &iloc);
136 if (err == 0) { 136 if (err == 0) {
137 inode->i_ctime = CURRENT_TIME_SEC; 137 inode->i_ctime = ext4_current_time(inode);
138 inode->i_generation = generation; 138 inode->i_generation = generation;
139 err = ext4_mark_iloc_dirty(handle, inode, &iloc); 139 err = ext4_mark_iloc_dirty(handle, inode, &iloc);
140 } 140 }