diff options
-rw-r--r-- | fs/gfs2/bmap.c | 10 | ||||
-rw-r--r-- | fs/gfs2/dir.c | 10 | ||||
-rw-r--r-- | fs/gfs2/eattr.c | 8 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 30 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 1 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 2 | ||||
-rw-r--r-- | include/linux/gfs2_ondisk.h | 5 |
7 files changed, 39 insertions, 27 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index b784cf3c6482..d16044cb023a 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -772,7 +772,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
772 | gfs2_free_data(ip, bstart, blen); | 772 | gfs2_free_data(ip, bstart, blen); |
773 | } | 773 | } |
774 | 774 | ||
775 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 775 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
776 | 776 | ||
777 | gfs2_dinode_out(ip, dibh->b_data); | 777 | gfs2_dinode_out(ip, dibh->b_data); |
778 | 778 | ||
@@ -847,7 +847,7 @@ static int do_grow(struct gfs2_inode *ip, u64 size) | |||
847 | } | 847 | } |
848 | 848 | ||
849 | ip->i_di.di_size = size; | 849 | ip->i_di.di_size = size; |
850 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 850 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
851 | 851 | ||
852 | error = gfs2_meta_inode_buffer(ip, &dibh); | 852 | error = gfs2_meta_inode_buffer(ip, &dibh); |
853 | if (error) | 853 | if (error) |
@@ -958,7 +958,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
958 | 958 | ||
959 | if (gfs2_is_stuffed(ip)) { | 959 | if (gfs2_is_stuffed(ip)) { |
960 | ip->i_di.di_size = size; | 960 | ip->i_di.di_size = size; |
961 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 961 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
962 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 962 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
963 | gfs2_dinode_out(ip, dibh->b_data); | 963 | gfs2_dinode_out(ip, dibh->b_data); |
964 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); | 964 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); |
@@ -970,7 +970,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
970 | 970 | ||
971 | if (!error) { | 971 | if (!error) { |
972 | ip->i_di.di_size = size; | 972 | ip->i_di.di_size = size; |
973 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 973 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
974 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; | 974 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; |
975 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 975 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
976 | gfs2_dinode_out(ip, dibh->b_data); | 976 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1043,7 +1043,7 @@ static int trunc_end(struct gfs2_inode *ip) | |||
1043 | ip->i_no_addr; | 1043 | ip->i_no_addr; |
1044 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); | 1044 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); |
1045 | } | 1045 | } |
1046 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1046 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
1047 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; | 1047 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; |
1048 | 1048 | ||
1049 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1049 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 2f154049b59d..f793e31a050e 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -130,7 +130,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, | |||
130 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); | 130 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); |
131 | if (ip->i_di.di_size < offset + size) | 131 | if (ip->i_di.di_size < offset + size) |
132 | ip->i_di.di_size = offset + size; | 132 | ip->i_di.di_size = offset + size; |
133 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 133 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
134 | gfs2_dinode_out(ip, dibh->b_data); | 134 | gfs2_dinode_out(ip, dibh->b_data); |
135 | 135 | ||
136 | brelse(dibh); | 136 | brelse(dibh); |
@@ -228,7 +228,7 @@ out: | |||
228 | 228 | ||
229 | if (ip->i_di.di_size < offset + copied) | 229 | if (ip->i_di.di_size < offset + copied) |
230 | ip->i_di.di_size = offset + copied; | 230 | ip->i_di.di_size = offset + copied; |
231 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 231 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
232 | 232 | ||
233 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 233 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
234 | gfs2_dinode_out(ip, dibh->b_data); | 234 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1622,7 +1622,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name, | |||
1622 | break; | 1622 | break; |
1623 | gfs2_trans_add_bh(ip->i_gl, bh, 1); | 1623 | gfs2_trans_add_bh(ip->i_gl, bh, 1); |
1624 | ip->i_di.di_entries++; | 1624 | ip->i_di.di_entries++; |
1625 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1625 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
1626 | gfs2_dinode_out(ip, bh->b_data); | 1626 | gfs2_dinode_out(ip, bh->b_data); |
1627 | brelse(bh); | 1627 | brelse(bh); |
1628 | error = 0; | 1628 | error = 0; |
@@ -1708,7 +1708,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct qstr *name) | |||
1708 | gfs2_consist_inode(dip); | 1708 | gfs2_consist_inode(dip); |
1709 | gfs2_trans_add_bh(dip->i_gl, bh, 1); | 1709 | gfs2_trans_add_bh(dip->i_gl, bh, 1); |
1710 | dip->i_di.di_entries--; | 1710 | dip->i_di.di_entries--; |
1711 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1711 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME; |
1712 | gfs2_dinode_out(dip, bh->b_data); | 1712 | gfs2_dinode_out(dip, bh->b_data); |
1713 | brelse(bh); | 1713 | brelse(bh); |
1714 | mark_inode_dirty(&dip->i_inode); | 1714 | mark_inode_dirty(&dip->i_inode); |
@@ -1756,7 +1756,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename, | |||
1756 | gfs2_trans_add_bh(dip->i_gl, bh, 1); | 1756 | gfs2_trans_add_bh(dip->i_gl, bh, 1); |
1757 | } | 1757 | } |
1758 | 1758 | ||
1759 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1759 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME; |
1760 | gfs2_dinode_out(dip, bh->b_data); | 1760 | gfs2_dinode_out(dip, bh->b_data); |
1761 | brelse(bh); | 1761 | brelse(bh); |
1762 | return 0; | 1762 | return 0; |
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 40e1d37112e6..2a7435b5c4dc 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c | |||
@@ -300,7 +300,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, | |||
300 | 300 | ||
301 | error = gfs2_meta_inode_buffer(ip, &dibh); | 301 | error = gfs2_meta_inode_buffer(ip, &dibh); |
302 | if (!error) { | 302 | if (!error) { |
303 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 303 | ip->i_inode.i_ctime = CURRENT_TIME; |
304 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 304 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
305 | gfs2_dinode_out(ip, dibh->b_data); | 305 | gfs2_dinode_out(ip, dibh->b_data); |
306 | brelse(dibh); | 306 | brelse(dibh); |
@@ -717,7 +717,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
717 | (er->er_mode & S_IFMT)); | 717 | (er->er_mode & S_IFMT)); |
718 | ip->i_inode.i_mode = er->er_mode; | 718 | ip->i_inode.i_mode = er->er_mode; |
719 | } | 719 | } |
720 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 720 | ip->i_inode.i_ctime = CURRENT_TIME; |
721 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 721 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
722 | gfs2_dinode_out(ip, dibh->b_data); | 722 | gfs2_dinode_out(ip, dibh->b_data); |
723 | brelse(dibh); | 723 | brelse(dibh); |
@@ -852,7 +852,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh, | |||
852 | (ip->i_inode.i_mode & S_IFMT) == (er->er_mode & S_IFMT)); | 852 | (ip->i_inode.i_mode & S_IFMT) == (er->er_mode & S_IFMT)); |
853 | ip->i_inode.i_mode = er->er_mode; | 853 | ip->i_inode.i_mode = er->er_mode; |
854 | } | 854 | } |
855 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 855 | ip->i_inode.i_ctime = CURRENT_TIME; |
856 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 856 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
857 | gfs2_dinode_out(ip, dibh->b_data); | 857 | gfs2_dinode_out(ip, dibh->b_data); |
858 | brelse(dibh); | 858 | brelse(dibh); |
@@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el) | |||
1133 | 1133 | ||
1134 | error = gfs2_meta_inode_buffer(ip, &dibh); | 1134 | error = gfs2_meta_inode_buffer(ip, &dibh); |
1135 | if (!error) { | 1135 | if (!error) { |
1136 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1136 | ip->i_inode.i_ctime = CURRENT_TIME; |
1137 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1137 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1138 | gfs2_dinode_out(ip, dibh->b_data); | 1138 | gfs2_dinode_out(ip, dibh->b_data); |
1139 | brelse(dibh); | 1139 | brelse(dibh); |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index a31a4b80ba3c..3ef0f051d076 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -178,11 +178,11 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | |||
178 | di->di_blocks = be64_to_cpu(str->di_blocks); | 178 | di->di_blocks = be64_to_cpu(str->di_blocks); |
179 | gfs2_set_inode_blocks(&ip->i_inode); | 179 | gfs2_set_inode_blocks(&ip->i_inode); |
180 | ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); | 180 | ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); |
181 | ip->i_inode.i_atime.tv_nsec = 0; | 181 | ip->i_inode.i_atime.tv_nsec = be32_to_cpu(str->di_atime_nsec); |
182 | ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); | 182 | ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); |
183 | ip->i_inode.i_mtime.tv_nsec = 0; | 183 | ip->i_inode.i_mtime.tv_nsec = be32_to_cpu(str->di_mtime_nsec); |
184 | ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime); | 184 | ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime); |
185 | ip->i_inode.i_ctime.tv_nsec = 0; | 185 | ip->i_inode.i_ctime.tv_nsec = be32_to_cpu(str->di_ctime_nsec); |
186 | 186 | ||
187 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); | 187 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); |
188 | di->di_goal_data = be64_to_cpu(str->di_goal_data); | 188 | di->di_goal_data = be64_to_cpu(str->di_goal_data); |
@@ -317,7 +317,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff) | |||
317 | else | 317 | else |
318 | drop_nlink(&ip->i_inode); | 318 | drop_nlink(&ip->i_inode); |
319 | 319 | ||
320 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 320 | ip->i_inode.i_ctime = CURRENT_TIME; |
321 | 321 | ||
322 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 322 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
323 | gfs2_dinode_out(ip, dibh->b_data); | 323 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -648,6 +648,7 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
648 | struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); | 648 | struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); |
649 | struct gfs2_dinode *di; | 649 | struct gfs2_dinode *di; |
650 | struct buffer_head *dibh; | 650 | struct buffer_head *dibh; |
651 | struct timespec tv = CURRENT_TIME; | ||
651 | 652 | ||
652 | dibh = gfs2_meta_new(gl, inum->no_addr); | 653 | dibh = gfs2_meta_new(gl, inum->no_addr); |
653 | gfs2_trans_add_bh(gl, dibh, 1); | 654 | gfs2_trans_add_bh(gl, dibh, 1); |
@@ -663,7 +664,7 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
663 | di->di_nlink = 0; | 664 | di->di_nlink = 0; |
664 | di->di_size = 0; | 665 | di->di_size = 0; |
665 | di->di_blocks = cpu_to_be64(1); | 666 | di->di_blocks = cpu_to_be64(1); |
666 | di->di_atime = di->di_mtime = di->di_ctime = cpu_to_be64(get_seconds()); | 667 | di->di_atime = di->di_mtime = di->di_ctime = cpu_to_be64(tv.tv_sec); |
667 | di->di_major = cpu_to_be32(MAJOR(dev)); | 668 | di->di_major = cpu_to_be32(MAJOR(dev)); |
668 | di->di_minor = cpu_to_be32(MINOR(dev)); | 669 | di->di_minor = cpu_to_be32(MINOR(dev)); |
669 | di->di_goal_meta = di->di_goal_data = cpu_to_be64(inum->no_addr); | 670 | di->di_goal_meta = di->di_goal_data = cpu_to_be64(inum->no_addr); |
@@ -693,6 +694,9 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
693 | di->di_entries = 0; | 694 | di->di_entries = 0; |
694 | memset(&di->__pad4, 0, sizeof(di->__pad4)); | 695 | memset(&di->__pad4, 0, sizeof(di->__pad4)); |
695 | di->di_eattr = 0; | 696 | di->di_eattr = 0; |
697 | di->di_atime_nsec = cpu_to_be32(tv.tv_nsec); | ||
698 | di->di_mtime_nsec = cpu_to_be32(tv.tv_nsec); | ||
699 | di->di_ctime_nsec = cpu_to_be32(tv.tv_nsec); | ||
696 | memset(&di->di_reserved, 0, sizeof(di->di_reserved)); | 700 | memset(&di->di_reserved, 0, sizeof(di->di_reserved)); |
697 | 701 | ||
698 | brelse(dibh); | 702 | brelse(dibh); |
@@ -1135,10 +1139,11 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1135 | struct gfs2_glock *gl = gh->gh_gl; | 1139 | struct gfs2_glock *gl = gh->gh_gl; |
1136 | struct gfs2_sbd *sdp = gl->gl_sbd; | 1140 | struct gfs2_sbd *sdp = gl->gl_sbd; |
1137 | struct gfs2_inode *ip = gl->gl_object; | 1141 | struct gfs2_inode *ip = gl->gl_object; |
1138 | s64 curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum); | 1142 | s64 quantum = gfs2_tune_get(sdp, gt_atime_quantum); |
1139 | unsigned int state; | 1143 | unsigned int state; |
1140 | int flags; | 1144 | int flags; |
1141 | int error; | 1145 | int error; |
1146 | struct timespec tv = CURRENT_TIME; | ||
1142 | 1147 | ||
1143 | if (gfs2_assert_warn(sdp, gh->gh_flags & GL_ATIME) || | 1148 | if (gfs2_assert_warn(sdp, gh->gh_flags & GL_ATIME) || |
1144 | gfs2_assert_warn(sdp, !(gh->gh_flags & GL_ASYNC)) || | 1149 | gfs2_assert_warn(sdp, !(gh->gh_flags & GL_ASYNC)) || |
@@ -1156,8 +1161,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1156 | (sdp->sd_vfs->s_flags & MS_RDONLY)) | 1161 | (sdp->sd_vfs->s_flags & MS_RDONLY)) |
1157 | return 0; | 1162 | return 0; |
1158 | 1163 | ||
1159 | curtime = get_seconds(); | 1164 | if (tv.tv_sec - ip->i_inode.i_atime.tv_sec >= quantum) { |
1160 | if (curtime - ip->i_inode.i_atime.tv_sec >= quantum) { | ||
1161 | gfs2_glock_dq(gh); | 1165 | gfs2_glock_dq(gh); |
1162 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, gh->gh_flags & ~LM_FLAG_ANY, | 1166 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, gh->gh_flags & ~LM_FLAG_ANY, |
1163 | gh); | 1167 | gh); |
@@ -1168,8 +1172,8 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1168 | /* Verify that atime hasn't been updated while we were | 1172 | /* Verify that atime hasn't been updated while we were |
1169 | trying to get exclusive lock. */ | 1173 | trying to get exclusive lock. */ |
1170 | 1174 | ||
1171 | curtime = get_seconds(); | 1175 | tv = CURRENT_TIME; |
1172 | if (curtime - ip->i_inode.i_atime.tv_sec >= quantum) { | 1176 | if (tv.tv_sec - ip->i_inode.i_atime.tv_sec >= quantum) { |
1173 | struct buffer_head *dibh; | 1177 | struct buffer_head *dibh; |
1174 | struct gfs2_dinode *di; | 1178 | struct gfs2_dinode *di; |
1175 | 1179 | ||
@@ -1183,11 +1187,12 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1183 | if (error) | 1187 | if (error) |
1184 | goto fail_end_trans; | 1188 | goto fail_end_trans; |
1185 | 1189 | ||
1186 | ip->i_inode.i_atime.tv_sec = curtime; | 1190 | ip->i_inode.i_atime = tv; |
1187 | 1191 | ||
1188 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1192 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1189 | di = (struct gfs2_dinode *)dibh->b_data; | 1193 | di = (struct gfs2_dinode *)dibh->b_data; |
1190 | di->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); | 1194 | di->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); |
1195 | di->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); | ||
1191 | brelse(dibh); | 1196 | brelse(dibh); |
1192 | 1197 | ||
1193 | gfs2_trans_end(sdp); | 1198 | gfs2_trans_end(sdp); |
@@ -1290,6 +1295,9 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | |||
1290 | str->di_entries = cpu_to_be32(di->di_entries); | 1295 | str->di_entries = cpu_to_be32(di->di_entries); |
1291 | 1296 | ||
1292 | str->di_eattr = cpu_to_be64(di->di_eattr); | 1297 | str->di_eattr = cpu_to_be64(di->di_eattr); |
1298 | str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); | ||
1299 | str->di_mtime_nsec = cpu_to_be32(ip->i_inode.i_mtime.tv_nsec); | ||
1300 | str->di_ctime_nsec = cpu_to_be32(ip->i_inode.i_ctime.tv_nsec); | ||
1293 | } | 1301 | } |
1294 | 1302 | ||
1295 | void gfs2_dinode_print(const struct gfs2_inode *ip) | 1303 | void gfs2_dinode_print(const struct gfs2_inode *ip) |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 0443e255173d..b46727275e58 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -104,6 +104,7 @@ static void init_vfs(struct super_block *sb, unsigned noatime) | |||
104 | sb->s_magic = GFS2_MAGIC; | 104 | sb->s_magic = GFS2_MAGIC; |
105 | sb->s_op = &gfs2_super_ops; | 105 | sb->s_op = &gfs2_super_ops; |
106 | sb->s_export_op = &gfs2_export_ops; | 106 | sb->s_export_op = &gfs2_export_ops; |
107 | sb->s_time_gran = 1; | ||
107 | sb->s_maxbytes = MAX_LFS_FILESIZE; | 108 | sb->s_maxbytes = MAX_LFS_FILESIZE; |
108 | 109 | ||
109 | if (sb->s_flags & (MS_NOATIME | MS_NODIRATIME)) | 110 | if (sb->s_flags & (MS_NOATIME | MS_NODIRATIME)) |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 919a661e4f79..9cc07f442ef5 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -757,7 +757,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, | |||
757 | error = gfs2_meta_inode_buffer(ip, &dibh); | 757 | error = gfs2_meta_inode_buffer(ip, &dibh); |
758 | if (error) | 758 | if (error) |
759 | goto out_end_trans; | 759 | goto out_end_trans; |
760 | ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 760 | ip->i_inode.i_ctime = CURRENT_TIME; |
761 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 761 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
762 | gfs2_dinode_out(ip, dibh->b_data); | 762 | gfs2_dinode_out(ip, dibh->b_data); |
763 | brelse(dibh); | 763 | brelse(dibh); |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 2c4e24fb0765..a44a6a078f0a 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -259,8 +259,11 @@ struct gfs2_dinode { | |||
259 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ | 259 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ |
260 | 260 | ||
261 | __be64 di_eattr; /* extended attribute block number */ | 261 | __be64 di_eattr; /* extended attribute block number */ |
262 | __be32 di_atime_nsec; /* nsec portion of atime */ | ||
263 | __be32 di_mtime_nsec; /* nsec portion of mtime */ | ||
264 | __be32 di_ctime_nsec; /* nsec portion of ctime */ | ||
262 | 265 | ||
263 | __u8 di_reserved[56]; | 266 | __u8 di_reserved[44]; |
264 | }; | 267 | }; |
265 | 268 | ||
266 | /* | 269 | /* |