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/dir.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/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 830cf48184e3..d8d823240542 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -128,8 +128,8 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, | |||
128 | 128 | ||
129 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 129 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
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_disksize < offset + size) |
132 | ip->i_di.di_size = offset + size; | 132 | ip->i_disksize = offset + size; |
133 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; | 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 | ||
@@ -226,8 +226,8 @@ out: | |||
226 | if (error) | 226 | if (error) |
227 | return error; | 227 | return error; |
228 | 228 | ||
229 | if (ip->i_di.di_size < offset + copied) | 229 | if (ip->i_disksize < offset + copied) |
230 | ip->i_di.di_size = offset + copied; | 230 | ip->i_disksize = offset + copied; |
231 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; | 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); |
@@ -277,11 +277,11 @@ static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf, u64 offset, | |||
277 | int copied = 0; | 277 | int copied = 0; |
278 | int error = 0; | 278 | int error = 0; |
279 | 279 | ||
280 | if (offset >= ip->i_di.di_size) | 280 | if (offset >= ip->i_disksize) |
281 | return 0; | 281 | return 0; |
282 | 282 | ||
283 | if (offset + size > ip->i_di.di_size) | 283 | if (offset + size > ip->i_disksize) |
284 | size = ip->i_di.di_size - offset; | 284 | size = ip->i_disksize - offset; |
285 | 285 | ||
286 | if (!size) | 286 | if (!size) |
287 | return 0; | 287 | return 0; |
@@ -760,7 +760,7 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode, | |||
760 | unsigned hsize = 1 << ip->i_depth; | 760 | unsigned hsize = 1 << ip->i_depth; |
761 | unsigned index; | 761 | unsigned index; |
762 | u64 ln; | 762 | u64 ln; |
763 | if (hsize * sizeof(u64) != ip->i_di.di_size) { | 763 | if (hsize * sizeof(u64) != ip->i_disksize) { |
764 | gfs2_consist_inode(ip); | 764 | gfs2_consist_inode(ip); |
765 | return ERR_PTR(-EIO); | 765 | return ERR_PTR(-EIO); |
766 | } | 766 | } |
@@ -905,7 +905,7 @@ static int dir_make_exhash(struct inode *inode) | |||
905 | for (x = sdp->sd_hash_ptrs; x--; lp++) | 905 | for (x = sdp->sd_hash_ptrs; x--; lp++) |
906 | *lp = cpu_to_be64(bn); | 906 | *lp = cpu_to_be64(bn); |
907 | 907 | ||
908 | dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2; | 908 | dip->i_disksize = sdp->sd_sb.sb_bsize / 2; |
909 | gfs2_add_inode_blocks(&dip->i_inode, 1); | 909 | gfs2_add_inode_blocks(&dip->i_inode, 1); |
910 | dip->i_di.di_flags |= GFS2_DIF_EXHASH; | 910 | dip->i_di.di_flags |= GFS2_DIF_EXHASH; |
911 | 911 | ||
@@ -1082,7 +1082,7 @@ static int dir_double_exhash(struct gfs2_inode *dip) | |||
1082 | int error = 0; | 1082 | int error = 0; |
1083 | 1083 | ||
1084 | hsize = 1 << dip->i_depth; | 1084 | hsize = 1 << dip->i_depth; |
1085 | if (hsize * sizeof(u64) != dip->i_di.di_size) { | 1085 | if (hsize * sizeof(u64) != dip->i_disksize) { |
1086 | gfs2_consist_inode(dip); | 1086 | gfs2_consist_inode(dip); |
1087 | return -EIO; | 1087 | return -EIO; |
1088 | } | 1088 | } |
@@ -1091,7 +1091,7 @@ static int dir_double_exhash(struct gfs2_inode *dip) | |||
1091 | 1091 | ||
1092 | buf = kcalloc(3, sdp->sd_hash_bsize, GFP_NOFS | __GFP_NOFAIL); | 1092 | buf = kcalloc(3, sdp->sd_hash_bsize, GFP_NOFS | __GFP_NOFAIL); |
1093 | 1093 | ||
1094 | for (block = dip->i_di.di_size >> sdp->sd_hash_bsize_shift; block--;) { | 1094 | for (block = dip->i_disksize >> sdp->sd_hash_bsize_shift; block--;) { |
1095 | error = gfs2_dir_read_data(dip, (char *)buf, | 1095 | error = gfs2_dir_read_data(dip, (char *)buf, |
1096 | block * sdp->sd_hash_bsize, | 1096 | block * sdp->sd_hash_bsize, |
1097 | sdp->sd_hash_bsize, 1); | 1097 | sdp->sd_hash_bsize, 1); |
@@ -1370,7 +1370,7 @@ static int dir_e_read(struct inode *inode, u64 *offset, void *opaque, | |||
1370 | unsigned depth = 0; | 1370 | unsigned depth = 0; |
1371 | 1371 | ||
1372 | hsize = 1 << dip->i_depth; | 1372 | hsize = 1 << dip->i_depth; |
1373 | if (hsize * sizeof(u64) != dip->i_di.di_size) { | 1373 | if (hsize * sizeof(u64) != dip->i_disksize) { |
1374 | gfs2_consist_inode(dip); | 1374 | gfs2_consist_inode(dip); |
1375 | return -EIO; | 1375 | return -EIO; |
1376 | } | 1376 | } |
@@ -1784,7 +1784,7 @@ static int foreach_leaf(struct gfs2_inode *dip, leaf_call_t lc, void *data) | |||
1784 | int error = 0; | 1784 | int error = 0; |
1785 | 1785 | ||
1786 | hsize = 1 << dip->i_depth; | 1786 | hsize = 1 << dip->i_depth; |
1787 | if (hsize * sizeof(u64) != dip->i_di.di_size) { | 1787 | if (hsize * sizeof(u64) != dip->i_disksize) { |
1788 | gfs2_consist_inode(dip); | 1788 | gfs2_consist_inode(dip); |
1789 | return -EIO; | 1789 | return -EIO; |
1790 | } | 1790 | } |