diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-11-04 04:47:33 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-01-05 02:38:58 -0500 |
commit | c9e98886776386f1f7828d9685e78cd341849867 (patch) | |
tree | 5bf4ac819d1e9394f960f21a48881a9d2f9f69fe /fs/gfs2/inode.c | |
parent | 3767ac21f471fe669a7d9f6abef682ddac8fc3d8 (diff) |
GFS2: Move i_size from gfs2_dinode_host and rename it to i_disksize
This patch moved the i_size field from the gfs2_dinode_host and
following the ext3 convention renames it i_disksize.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 91735b8cecd8..baf8b24b2de7 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -273,8 +273,8 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | |||
273 | * to do that. | 273 | * to do that. |
274 | */ | 274 | */ |
275 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); | 275 | ip->i_inode.i_nlink = be32_to_cpu(str->di_nlink); |
276 | di->di_size = be64_to_cpu(str->di_size); | 276 | ip->i_disksize = be64_to_cpu(str->di_size); |
277 | i_size_write(&ip->i_inode, di->di_size); | 277 | i_size_write(&ip->i_inode, ip->i_disksize); |
278 | gfs2_set_inode_blocks(&ip->i_inode, be64_to_cpu(str->di_blocks)); | 278 | gfs2_set_inode_blocks(&ip->i_inode, be64_to_cpu(str->di_blocks)); |
279 | atime.tv_sec = be64_to_cpu(str->di_atime); | 279 | atime.tv_sec = be64_to_cpu(str->di_atime); |
280 | atime.tv_nsec = be32_to_cpu(str->di_atime_nsec); | 280 | atime.tv_nsec = be32_to_cpu(str->di_atime_nsec); |
@@ -1167,7 +1167,7 @@ int gfs2_readlinki(struct gfs2_inode *ip, char **buf, unsigned int *len) | |||
1167 | return error; | 1167 | return error; |
1168 | } | 1168 | } |
1169 | 1169 | ||
1170 | if (!ip->i_di.di_size) { | 1170 | if (!ip->i_disksize) { |
1171 | gfs2_consist_inode(ip); | 1171 | gfs2_consist_inode(ip); |
1172 | error = -EIO; | 1172 | error = -EIO; |
1173 | goto out; | 1173 | goto out; |
@@ -1177,7 +1177,7 @@ int gfs2_readlinki(struct gfs2_inode *ip, char **buf, unsigned int *len) | |||
1177 | if (error) | 1177 | if (error) |
1178 | goto out; | 1178 | goto out; |
1179 | 1179 | ||
1180 | x = ip->i_di.di_size + 1; | 1180 | x = ip->i_disksize + 1; |
1181 | if (x > *len) { | 1181 | if (x > *len) { |
1182 | *buf = kmalloc(x, GFP_NOFS); | 1182 | *buf = kmalloc(x, GFP_NOFS); |
1183 | if (!*buf) { | 1183 | if (!*buf) { |
@@ -1255,7 +1255,7 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | |||
1255 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); | 1255 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); |
1256 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); | 1256 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); |
1257 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); | 1257 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); |
1258 | str->di_size = cpu_to_be64(di->di_size); | 1258 | str->di_size = cpu_to_be64(ip->i_disksize); |
1259 | str->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); | 1259 | str->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); |
1260 | str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); | 1260 | str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); |
1261 | str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); | 1261 | str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); |
@@ -1287,7 +1287,8 @@ void gfs2_dinode_print(const struct gfs2_inode *ip) | |||
1287 | (unsigned long long)ip->i_no_formal_ino); | 1287 | (unsigned long long)ip->i_no_formal_ino); |
1288 | printk(KERN_INFO " no_addr = %llu\n", | 1288 | printk(KERN_INFO " no_addr = %llu\n", |
1289 | (unsigned long long)ip->i_no_addr); | 1289 | (unsigned long long)ip->i_no_addr); |
1290 | printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); | 1290 | printk(KERN_INFO " i_disksize = %llu\n", |
1291 | (unsigned long long)ip->i_disksize); | ||
1291 | printk(KERN_INFO " blocks = %llu\n", | 1292 | printk(KERN_INFO " blocks = %llu\n", |
1292 | (unsigned long long)gfs2_get_inode_blocks(&ip->i_inode)); | 1293 | (unsigned long long)gfs2_get_inode_blocks(&ip->i_inode)); |
1293 | printk(KERN_INFO " i_goal = %llu\n", | 1294 | printk(KERN_INFO " i_goal = %llu\n", |