aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-02-06 04:25:45 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2008-03-31 05:40:37 -0400
commitce276b06e8b81845926387e93f77bf81e14b5cc2 (patch)
treeed28cd74af058761ccaa30829babc872762cf0a7 /fs/gfs2/inode.c
parent9feb7c889f2a3b088a7f6583e609bd39997c0f47 (diff)
[GFS2] Reduce inode size by merging fields
There were three fields being used to keep track of the location of the most recently allocated block for each inode. These have been merged into a single field in order to better keep the data and metadata for an inode close on disk, and also to reduce the space required for storage. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 65fdfee9ca9b..c3fe8aa03c4e 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -282,8 +282,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
282 ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime); 282 ip->i_inode.i_ctime.tv_sec = be64_to_cpu(str->di_ctime);
283 ip->i_inode.i_ctime.tv_nsec = be32_to_cpu(str->di_ctime_nsec); 283 ip->i_inode.i_ctime.tv_nsec = be32_to_cpu(str->di_ctime_nsec);
284 284
285 di->di_goal_meta = be64_to_cpu(str->di_goal_meta); 285 ip->i_goal = be64_to_cpu(str->di_goal_meta);
286 di->di_goal_data = be64_to_cpu(str->di_goal_data);
287 di->di_generation = be64_to_cpu(str->di_generation); 286 di->di_generation = be64_to_cpu(str->di_generation);
288 287
289 di->di_flags = be32_to_cpu(str->di_flags); 288 di->di_flags = be32_to_cpu(str->di_flags);
@@ -1404,8 +1403,8 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
1404 str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); 1403 str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec);
1405 str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec); 1404 str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec);
1406 1405
1407 str->di_goal_meta = cpu_to_be64(di->di_goal_meta); 1406 str->di_goal_meta = cpu_to_be64(ip->i_goal);
1408 str->di_goal_data = cpu_to_be64(di->di_goal_data); 1407 str->di_goal_data = cpu_to_be64(ip->i_goal);
1409 str->di_generation = cpu_to_be64(di->di_generation); 1408 str->di_generation = cpu_to_be64(di->di_generation);
1410 1409
1411 str->di_flags = cpu_to_be32(di->di_flags); 1410 str->di_flags = cpu_to_be32(di->di_flags);
@@ -1433,10 +1432,8 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
1433 printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); 1432 printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size);
1434 printk(KERN_INFO " di_blocks = %llu\n", 1433 printk(KERN_INFO " di_blocks = %llu\n",
1435 (unsigned long long)di->di_blocks); 1434 (unsigned long long)di->di_blocks);
1436 printk(KERN_INFO " di_goal_meta = %llu\n", 1435 printk(KERN_INFO " i_goal = %llu\n",
1437 (unsigned long long)di->di_goal_meta); 1436 (unsigned long long)ip->i_goal);
1438 printk(KERN_INFO " di_goal_data = %llu\n",
1439 (unsigned long long)di->di_goal_data);
1440 printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags); 1437 printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags);
1441 printk(KERN_INFO " i_height = %u\n", ip->i_height); 1438 printk(KERN_INFO " i_height = %u\n", ip->i_height);
1442 printk(KERN_INFO " i_depth = %u\n", ip->i_depth); 1439 printk(KERN_INFO " i_depth = %u\n", ip->i_depth);