diff options
Diffstat (limited to 'fs/gfs2/ondisk.c')
-rw-r--r-- | fs/gfs2/ondisk.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index d9ecfd23a49e..cd4cf055c37d 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c | |||
@@ -33,26 +33,10 @@ | |||
33 | * first arg: the cpu-order structure | 33 | * first arg: the cpu-order structure |
34 | */ | 34 | */ |
35 | 35 | ||
36 | void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf) | 36 | void gfs2_inum_out(const struct gfs2_inode *ip, struct gfs2_dirent *dent) |
37 | { | 37 | { |
38 | const struct gfs2_inum *str = buf; | 38 | dent->de_inum.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); |
39 | 39 | dent->de_inum.no_addr = cpu_to_be64(ip->i_no_addr); | |
40 | no->no_formal_ino = be64_to_cpu(str->no_formal_ino); | ||
41 | no->no_addr = be64_to_cpu(str->no_addr); | ||
42 | } | ||
43 | |||
44 | void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf) | ||
45 | { | ||
46 | struct gfs2_inum *str = buf; | ||
47 | |||
48 | str->no_formal_ino = cpu_to_be64(no->no_formal_ino); | ||
49 | str->no_addr = cpu_to_be64(no->no_addr); | ||
50 | } | ||
51 | |||
52 | static void gfs2_inum_print(const struct gfs2_inum_host *no) | ||
53 | { | ||
54 | printk(KERN_INFO " no_formal_ino = %llu\n", (unsigned long long)no->no_formal_ino); | ||
55 | printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); | ||
56 | } | 40 | } |
57 | 41 | ||
58 | static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf) | 42 | static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf) |
@@ -74,9 +58,10 @@ void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf) | |||
74 | sb->sb_multihost_format = be32_to_cpu(str->sb_multihost_format); | 58 | sb->sb_multihost_format = be32_to_cpu(str->sb_multihost_format); |
75 | sb->sb_bsize = be32_to_cpu(str->sb_bsize); | 59 | sb->sb_bsize = be32_to_cpu(str->sb_bsize); |
76 | sb->sb_bsize_shift = be32_to_cpu(str->sb_bsize_shift); | 60 | sb->sb_bsize_shift = be32_to_cpu(str->sb_bsize_shift); |
77 | 61 | sb->sb_master_dir.no_addr = be64_to_cpu(str->sb_master_dir.no_addr); | |
78 | gfs2_inum_in(&sb->sb_master_dir, (char *)&str->sb_master_dir); | 62 | sb->sb_master_dir.no_formal_ino = be64_to_cpu(str->sb_master_dir.no_formal_ino); |
79 | gfs2_inum_in(&sb->sb_root_dir, (char *)&str->sb_root_dir); | 63 | sb->sb_root_dir.no_addr = be64_to_cpu(str->sb_root_dir.no_addr); |
64 | sb->sb_root_dir.no_formal_ino = be64_to_cpu(str->sb_root_dir.no_formal_ino); | ||
80 | 65 | ||
81 | memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN); | 66 | memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN); |
82 | memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); | 67 | memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); |
@@ -146,9 +131,8 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | |||
146 | str->di_header.__pad0 = 0; | 131 | str->di_header.__pad0 = 0; |
147 | str->di_header.mh_format = cpu_to_be32(GFS2_FORMAT_DI); | 132 | str->di_header.mh_format = cpu_to_be32(GFS2_FORMAT_DI); |
148 | str->di_header.__pad1 = 0; | 133 | str->di_header.__pad1 = 0; |
149 | 134 | str->di_num.no_addr = cpu_to_be64(ip->i_no_addr); | |
150 | gfs2_inum_out(&ip->i_num, &str->di_num); | 135 | str->di_num.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); |
151 | |||
152 | str->di_mode = cpu_to_be32(ip->i_inode.i_mode); | 136 | str->di_mode = cpu_to_be32(ip->i_inode.i_mode); |
153 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); | 137 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); |
154 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); | 138 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); |
@@ -178,7 +162,8 @@ void gfs2_dinode_print(const struct gfs2_inode *ip) | |||
178 | { | 162 | { |
179 | const struct gfs2_dinode_host *di = &ip->i_di; | 163 | const struct gfs2_dinode_host *di = &ip->i_di; |
180 | 164 | ||
181 | gfs2_inum_print(&ip->i_num); | 165 | printk(KERN_INFO " no_formal_ino = %llu\n", (unsigned long long)ip->i_no_formal_ino); |
166 | printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)ip->i_no_addr); | ||
182 | 167 | ||
183 | printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); | 168 | printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); |
184 | printk(KERN_INFO " di_blocks = %llu\n", (unsigned long long)di->di_blocks); | 169 | printk(KERN_INFO " di_blocks = %llu\n", (unsigned long long)di->di_blocks); |