diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-01 14:35:17 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:34:23 -0500 |
commit | 1a7b1eed5802502fd649e04784becd58557fdcf1 (patch) | |
tree | 31e9e9ab8ba1296751985d49d55154848ae2eefa /fs/gfs2 | |
parent | 4f56110a00af5fb2e22fbccfcaf944d62cae8fcf (diff) |
[GFS2] Shrink gfs2_inode (6) - di_atime/di_mtime/di_ctime
Remove the di_[amc]time fields and use inode->i_[amc]time
fields instead. This saves 24 bytes from the gfs2_inode.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/bmap.c | 10 | ||||
-rw-r--r-- | fs/gfs2/dir.c | 10 | ||||
-rw-r--r-- | fs/gfs2/eattr.c | 9 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 44 | ||||
-rw-r--r-- | fs/gfs2/inode.h | 1 | ||||
-rw-r--r-- | fs/gfs2/ondisk.c | 10 | ||||
-rw-r--r-- | fs/gfs2/ops_address.c | 4 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 3 |
8 files changed, 29 insertions, 62 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 0c913eecf884..692d4a3da1bc 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -778,7 +778,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
778 | gfs2_free_data(ip, bstart, blen); | 778 | gfs2_free_data(ip, bstart, blen); |
779 | } | 779 | } |
780 | 780 | ||
781 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 781 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
782 | 782 | ||
783 | gfs2_dinode_out(ip, dibh->b_data); | 783 | gfs2_dinode_out(ip, dibh->b_data); |
784 | 784 | ||
@@ -853,7 +853,7 @@ static int do_grow(struct gfs2_inode *ip, u64 size) | |||
853 | } | 853 | } |
854 | 854 | ||
855 | ip->i_di.di_size = size; | 855 | ip->i_di.di_size = size; |
856 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 856 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
857 | 857 | ||
858 | error = gfs2_meta_inode_buffer(ip, &dibh); | 858 | error = gfs2_meta_inode_buffer(ip, &dibh); |
859 | if (error) | 859 | if (error) |
@@ -968,7 +968,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
968 | 968 | ||
969 | if (gfs2_is_stuffed(ip)) { | 969 | if (gfs2_is_stuffed(ip)) { |
970 | ip->i_di.di_size = size; | 970 | ip->i_di.di_size = size; |
971 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 971 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
972 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 972 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
973 | gfs2_dinode_out(ip, dibh->b_data); | 973 | gfs2_dinode_out(ip, dibh->b_data); |
974 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); | 974 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); |
@@ -980,7 +980,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
980 | 980 | ||
981 | if (!error) { | 981 | if (!error) { |
982 | ip->i_di.di_size = size; | 982 | ip->i_di.di_size = size; |
983 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 983 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
984 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; | 984 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; |
985 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 985 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
986 | gfs2_dinode_out(ip, dibh->b_data); | 986 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1053,7 +1053,7 @@ static int trunc_end(struct gfs2_inode *ip) | |||
1053 | ip->i_num.no_addr; | 1053 | ip->i_num.no_addr; |
1054 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); | 1054 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); |
1055 | } | 1055 | } |
1056 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 1056 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
1057 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; | 1057 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; |
1058 | 1058 | ||
1059 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1059 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 0742761e1e02..ca23c8beb3f0 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -131,7 +131,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, | |||
131 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); | 131 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); |
132 | if (ip->i_di.di_size < offset + size) | 132 | if (ip->i_di.di_size < offset + size) |
133 | ip->i_di.di_size = offset + size; | 133 | ip->i_di.di_size = offset + size; |
134 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 134 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
135 | gfs2_dinode_out(ip, dibh->b_data); | 135 | gfs2_dinode_out(ip, dibh->b_data); |
136 | 136 | ||
137 | brelse(dibh); | 137 | brelse(dibh); |
@@ -229,7 +229,7 @@ out: | |||
229 | 229 | ||
230 | if (ip->i_di.di_size < offset + copied) | 230 | if (ip->i_di.di_size < offset + copied) |
231 | ip->i_di.di_size = offset + copied; | 231 | ip->i_di.di_size = offset + copied; |
232 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 232 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
233 | 233 | ||
234 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 234 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
235 | gfs2_dinode_out(ip, dibh->b_data); | 235 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1560,7 +1560,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name, | |||
1560 | break; | 1560 | break; |
1561 | gfs2_trans_add_bh(ip->i_gl, bh, 1); | 1561 | gfs2_trans_add_bh(ip->i_gl, bh, 1); |
1562 | ip->i_di.di_entries++; | 1562 | ip->i_di.di_entries++; |
1563 | ip->i_di.di_mtime = ip->i_di.di_ctime = get_seconds(); | 1563 | ip->i_inode.i_mtime.tv_sec = ip->i_inode.i_ctime.tv_sec = get_seconds(); |
1564 | gfs2_dinode_out(ip, bh->b_data); | 1564 | gfs2_dinode_out(ip, bh->b_data); |
1565 | brelse(bh); | 1565 | brelse(bh); |
1566 | error = 0; | 1566 | error = 0; |
@@ -1646,7 +1646,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct qstr *name) | |||
1646 | gfs2_consist_inode(dip); | 1646 | gfs2_consist_inode(dip); |
1647 | gfs2_trans_add_bh(dip->i_gl, bh, 1); | 1647 | gfs2_trans_add_bh(dip->i_gl, bh, 1); |
1648 | dip->i_di.di_entries--; | 1648 | dip->i_di.di_entries--; |
1649 | dip->i_di.di_mtime = dip->i_di.di_ctime = get_seconds(); | 1649 | dip->i_inode.i_mtime.tv_sec = dip->i_inode.i_ctime.tv_sec = get_seconds(); |
1650 | gfs2_dinode_out(dip, bh->b_data); | 1650 | gfs2_dinode_out(dip, bh->b_data); |
1651 | brelse(bh); | 1651 | brelse(bh); |
1652 | mark_inode_dirty(&dip->i_inode); | 1652 | mark_inode_dirty(&dip->i_inode); |
@@ -1694,7 +1694,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename, | |||
1694 | gfs2_trans_add_bh(dip->i_gl, bh, 1); | 1694 | gfs2_trans_add_bh(dip->i_gl, bh, 1); |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | dip->i_di.di_mtime = dip->i_di.di_ctime = get_seconds(); | 1697 | dip->i_inode.i_mtime.tv_sec = dip->i_inode.i_ctime.tv_sec = get_seconds(); |
1698 | gfs2_dinode_out(dip, bh->b_data); | 1698 | gfs2_dinode_out(dip, bh->b_data); |
1699 | brelse(bh); | 1699 | brelse(bh); |
1700 | return 0; | 1700 | return 0; |
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 935cc9a57168..7dde84775ba7 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_di.di_ctime = get_seconds(); | 303 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
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); |
@@ -715,7 +715,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er, | |||
715 | (er->er_mode & S_IFMT)); | 715 | (er->er_mode & S_IFMT)); |
716 | ip->i_inode.i_mode = er->er_mode; | 716 | ip->i_inode.i_mode = er->er_mode; |
717 | } | 717 | } |
718 | ip->i_di.di_ctime = get_seconds(); | 718 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
719 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 719 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
720 | gfs2_dinode_out(ip, dibh->b_data); | 720 | gfs2_dinode_out(ip, dibh->b_data); |
721 | brelse(dibh); | 721 | brelse(dibh); |
@@ -850,7 +850,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh, | |||
850 | (ip->i_inode.i_mode & S_IFMT) == (er->er_mode & S_IFMT)); | 850 | (ip->i_inode.i_mode & S_IFMT) == (er->er_mode & S_IFMT)); |
851 | ip->i_inode.i_mode = er->er_mode; | 851 | ip->i_inode.i_mode = er->er_mode; |
852 | } | 852 | } |
853 | ip->i_di.di_ctime = get_seconds(); | 853 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
854 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 854 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
855 | gfs2_dinode_out(ip, dibh->b_data); | 855 | gfs2_dinode_out(ip, dibh->b_data); |
856 | brelse(dibh); | 856 | brelse(dibh); |
@@ -1130,7 +1130,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el) | |||
1130 | 1130 | ||
1131 | error = gfs2_meta_inode_buffer(ip, &dibh); | 1131 | error = gfs2_meta_inode_buffer(ip, &dibh); |
1132 | if (!error) { | 1132 | if (!error) { |
1133 | ip->i_di.di_ctime = get_seconds(); | 1133 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
1134 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1134 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1135 | gfs2_dinode_out(ip, dibh->b_data); | 1135 | gfs2_dinode_out(ip, dibh->b_data); |
1136 | brelse(dibh); | 1136 | brelse(dibh); |
@@ -1285,7 +1285,6 @@ int gfs2_ea_acl_chmod(struct gfs2_inode *ip, struct gfs2_ea_location *el, | |||
1285 | if (!error) { | 1285 | if (!error) { |
1286 | error = inode_setattr(&ip->i_inode, attr); | 1286 | error = inode_setattr(&ip->i_inode, attr); |
1287 | gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error); | 1287 | gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error); |
1288 | gfs2_inode_attr_out(ip); | ||
1289 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1288 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1290 | gfs2_dinode_out(ip, dibh->b_data); | 1289 | gfs2_dinode_out(ip, dibh->b_data); |
1291 | brelse(dibh); | 1290 | brelse(dibh); |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 711203984823..c22ae3c3a444 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -52,12 +52,6 @@ void gfs2_inode_attr_in(struct gfs2_inode *ip) | |||
52 | 52 | ||
53 | inode->i_ino = ip->i_num.no_addr; | 53 | inode->i_ino = ip->i_num.no_addr; |
54 | i_size_write(inode, di->di_size); | 54 | i_size_write(inode, di->di_size); |
55 | inode->i_atime.tv_sec = di->di_atime; | ||
56 | inode->i_mtime.tv_sec = di->di_mtime; | ||
57 | inode->i_ctime.tv_sec = di->di_ctime; | ||
58 | inode->i_atime.tv_nsec = 0; | ||
59 | inode->i_mtime.tv_nsec = 0; | ||
60 | inode->i_ctime.tv_nsec = 0; | ||
61 | inode->i_blocks = di->di_blocks << | 55 | inode->i_blocks = di->di_blocks << |
62 | (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); | 56 | (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); |
63 | 57 | ||
@@ -72,23 +66,6 @@ void gfs2_inode_attr_in(struct gfs2_inode *ip) | |||
72 | inode->i_flags &= ~S_APPEND; | 66 | inode->i_flags &= ~S_APPEND; |
73 | } | 67 | } |
74 | 68 | ||
75 | /** | ||
76 | * gfs2_inode_attr_out - Copy attributes from VFS inode into the dinode | ||
77 | * @ip: The GFS2 inode | ||
78 | * | ||
79 | * Only copy out the attributes that we want the VFS layer | ||
80 | * to be able to modify. | ||
81 | */ | ||
82 | |||
83 | void gfs2_inode_attr_out(struct gfs2_inode *ip) | ||
84 | { | ||
85 | struct inode *inode = &ip->i_inode; | ||
86 | struct gfs2_dinode_host *di = &ip->i_di; | ||
87 | di->di_atime = inode->i_atime.tv_sec; | ||
88 | di->di_mtime = inode->i_mtime.tv_sec; | ||
89 | di->di_ctime = inode->i_ctime.tv_sec; | ||
90 | } | ||
91 | |||
92 | static int iget_test(struct inode *inode, void *opaque) | 69 | static int iget_test(struct inode *inode, void *opaque) |
93 | { | 70 | { |
94 | struct gfs2_inode *ip = GFS2_I(inode); | 71 | struct gfs2_inode *ip = GFS2_I(inode); |
@@ -221,9 +198,12 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | |||
221 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); | 198 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); |
222 | di->di_size = be64_to_cpu(str->di_size); | 199 | di->di_size = be64_to_cpu(str->di_size); |
223 | di->di_blocks = be64_to_cpu(str->di_blocks); | 200 | di->di_blocks = be64_to_cpu(str->di_blocks); |
224 | di->di_atime = be64_to_cpu(str->di_atime); | 201 | ip->i_inode.i_atime.tv_sec = be64_to_cpu(str->di_atime); |
225 | di->di_mtime = be64_to_cpu(str->di_mtime); | 202 | ip->i_inode.i_atime.tv_nsec = 0; |
226 | di->di_ctime = be64_to_cpu(str->di_ctime); | 203 | ip->i_inode.i_mtime.tv_sec = be64_to_cpu(str->di_mtime); |
204 | ip->i_inode.i_mtime.tv_nsec = 0; | ||
205 | ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime); | ||
206 | ip->i_inode.i_ctime.tv_nsec = 0; | ||
227 | 207 | ||
228 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); | 208 | di->di_goal_meta = be64_to_cpu(str->di_goal_meta); |
229 | di->di_goal_data = be64_to_cpu(str->di_goal_data); | 209 | di->di_goal_data = be64_to_cpu(str->di_goal_data); |
@@ -360,7 +340,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff) | |||
360 | else | 340 | else |
361 | drop_nlink(&ip->i_inode); | 341 | drop_nlink(&ip->i_inode); |
362 | 342 | ||
363 | ip->i_di.di_ctime = get_seconds(); | 343 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
364 | 344 | ||
365 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 345 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
366 | gfs2_dinode_out(ip, dibh->b_data); | 346 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1224,7 +1204,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1224 | return 0; | 1204 | return 0; |
1225 | 1205 | ||
1226 | curtime = get_seconds(); | 1206 | curtime = get_seconds(); |
1227 | if (curtime - ip->i_di.di_atime >= quantum) { | 1207 | if (curtime - ip->i_inode.i_atime.tv_sec >= quantum) { |
1228 | gfs2_glock_dq(gh); | 1208 | gfs2_glock_dq(gh); |
1229 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, gh->gh_flags & ~LM_FLAG_ANY, | 1209 | gfs2_holder_reinit(LM_ST_EXCLUSIVE, gh->gh_flags & ~LM_FLAG_ANY, |
1230 | gh); | 1210 | gh); |
@@ -1236,7 +1216,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1236 | trying to get exclusive lock. */ | 1216 | trying to get exclusive lock. */ |
1237 | 1217 | ||
1238 | curtime = get_seconds(); | 1218 | curtime = get_seconds(); |
1239 | if (curtime - ip->i_di.di_atime >= quantum) { | 1219 | if (curtime - ip->i_inode.i_atime.tv_sec >= quantum) { |
1240 | struct buffer_head *dibh; | 1220 | struct buffer_head *dibh; |
1241 | struct gfs2_dinode *di; | 1221 | struct gfs2_dinode *di; |
1242 | 1222 | ||
@@ -1250,11 +1230,11 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) | |||
1250 | if (error) | 1230 | if (error) |
1251 | goto fail_end_trans; | 1231 | goto fail_end_trans; |
1252 | 1232 | ||
1253 | ip->i_di.di_atime = curtime; | 1233 | ip->i_inode.i_atime.tv_sec = curtime; |
1254 | 1234 | ||
1255 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1235 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1256 | di = (struct gfs2_dinode *)dibh->b_data; | 1236 | di = (struct gfs2_dinode *)dibh->b_data; |
1257 | di->di_atime = cpu_to_be64(ip->i_di.di_atime); | 1237 | di->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); |
1258 | brelse(dibh); | 1238 | brelse(dibh); |
1259 | 1239 | ||
1260 | gfs2_trans_end(sdp); | 1240 | gfs2_trans_end(sdp); |
@@ -1375,8 +1355,6 @@ __gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr) | |||
1375 | if (!error) { | 1355 | if (!error) { |
1376 | error = inode_setattr(&ip->i_inode, attr); | 1356 | error = inode_setattr(&ip->i_inode, attr); |
1377 | gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error); | 1357 | gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error); |
1378 | gfs2_inode_attr_out(ip); | ||
1379 | |||
1380 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1358 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
1381 | gfs2_dinode_out(ip, dibh->b_data); | 1359 | gfs2_dinode_out(ip, dibh->b_data); |
1382 | brelse(dibh); | 1360 | brelse(dibh); |
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 69cbf98509a9..54d584eddf29 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h | |||
@@ -26,7 +26,6 @@ static inline int gfs2_is_dir(struct gfs2_inode *ip) | |||
26 | } | 26 | } |
27 | 27 | ||
28 | void gfs2_inode_attr_in(struct gfs2_inode *ip); | 28 | void gfs2_inode_attr_in(struct gfs2_inode *ip); |
29 | void gfs2_inode_attr_out(struct gfs2_inode *ip); | ||
30 | struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum_host *inum, unsigned type); | 29 | struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum_host *inum, unsigned type); |
31 | struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum); | 30 | struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum); |
32 | 31 | ||
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index b4e354b18815..82003e872a37 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c | |||
@@ -167,9 +167,9 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | |||
167 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); | 167 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); |
168 | str->di_size = cpu_to_be64(di->di_size); | 168 | str->di_size = cpu_to_be64(di->di_size); |
169 | str->di_blocks = cpu_to_be64(di->di_blocks); | 169 | str->di_blocks = cpu_to_be64(di->di_blocks); |
170 | str->di_atime = cpu_to_be64(di->di_atime); | 170 | str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); |
171 | str->di_mtime = cpu_to_be64(di->di_mtime); | 171 | str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); |
172 | str->di_ctime = cpu_to_be64(di->di_ctime); | 172 | str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec); |
173 | 173 | ||
174 | str->di_goal_meta = cpu_to_be64(di->di_goal_meta); | 174 | str->di_goal_meta = cpu_to_be64(di->di_goal_meta); |
175 | str->di_goal_data = cpu_to_be64(di->di_goal_data); | 175 | str->di_goal_data = cpu_to_be64(di->di_goal_data); |
@@ -193,10 +193,6 @@ void gfs2_dinode_print(const struct gfs2_inode *ip) | |||
193 | 193 | ||
194 | printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); | 194 | printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); |
195 | printk(KERN_INFO " di_blocks = %llu\n", (unsigned long long)di->di_blocks); | 195 | printk(KERN_INFO " di_blocks = %llu\n", (unsigned long long)di->di_blocks); |
196 | printk(KERN_INFO " di_atime = %lld\n", (long long)di->di_atime); | ||
197 | printk(KERN_INFO " di_mtime = %lld\n", (long long)di->di_mtime); | ||
198 | printk(KERN_INFO " di_ctime = %lld\n", (long long)di->di_ctime); | ||
199 | |||
200 | printk(KERN_INFO " di_goal_meta = %llu\n", (unsigned long long)di->di_goal_meta); | 196 | printk(KERN_INFO " di_goal_meta = %llu\n", (unsigned long long)di->di_goal_meta); |
201 | printk(KERN_INFO " di_goal_data = %llu\n", (unsigned long long)di->di_goal_data); | 197 | printk(KERN_INFO " di_goal_data = %llu\n", (unsigned long long)di->di_goal_data); |
202 | 198 | ||
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 38b702a18244..5c3962c80e88 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c | |||
@@ -498,10 +498,6 @@ static int gfs2_commit_write(struct file *file, struct page *page, | |||
498 | di->di_size = cpu_to_be64(inode->i_size); | 498 | di->di_size = cpu_to_be64(inode->i_size); |
499 | } | 499 | } |
500 | 500 | ||
501 | di->di_atime = cpu_to_be64(inode->i_atime.tv_sec); | ||
502 | di->di_mtime = cpu_to_be64(inode->i_mtime.tv_sec); | ||
503 | di->di_ctime = cpu_to_be64(inode->i_ctime.tv_sec); | ||
504 | |||
505 | brelse(dibh); | 501 | brelse(dibh); |
506 | gfs2_trans_end(sdp); | 502 | gfs2_trans_end(sdp); |
507 | if (al->al_requested) { | 503 | if (al->al_requested) { |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 06176dee1550..585b43a94ace 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -729,7 +729,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, | |||
729 | error = gfs2_meta_inode_buffer(ip, &dibh); | 729 | error = gfs2_meta_inode_buffer(ip, &dibh); |
730 | if (error) | 730 | if (error) |
731 | goto out_end_trans; | 731 | goto out_end_trans; |
732 | ip->i_di.di_ctime = get_seconds(); | 732 | ip->i_inode.i_ctime.tv_sec = get_seconds(); |
733 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 733 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
734 | gfs2_dinode_out(ip, dibh->b_data); | 734 | gfs2_dinode_out(ip, dibh->b_data); |
735 | brelse(dibh); | 735 | brelse(dibh); |
@@ -915,7 +915,6 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) | |||
915 | 915 | ||
916 | error = inode_setattr(inode, attr); | 916 | error = inode_setattr(inode, attr); |
917 | gfs2_assert_warn(sdp, !error); | 917 | gfs2_assert_warn(sdp, !error); |
918 | gfs2_inode_attr_out(ip); | ||
919 | 918 | ||
920 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 919 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
921 | gfs2_dinode_out(ip, dibh->b_data); | 920 | gfs2_dinode_out(ip, dibh->b_data); |