aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/inode.c34
-rw-r--r--fs/gfs2/ondisk.c36
-rw-r--r--include/linux/gfs2_ondisk.h2
3 files changed, 36 insertions, 36 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 9875e9356cd3..b39cfcfe9276 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -208,6 +208,40 @@ fail:
208 return ERR_PTR(error); 208 return ERR_PTR(error);
209} 209}
210 210
211static void gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
212{
213 struct gfs2_dinode_host *di = &ip->i_di;
214 const struct gfs2_dinode *str = buf;
215
216 gfs2_meta_header_in(&di->di_header, buf);
217 gfs2_inum_in(&di->di_num, &str->di_num);
218
219 di->di_mode = be32_to_cpu(str->di_mode);
220 di->di_uid = be32_to_cpu(str->di_uid);
221 di->di_gid = be32_to_cpu(str->di_gid);
222 di->di_nlink = be32_to_cpu(str->di_nlink);
223 di->di_size = be64_to_cpu(str->di_size);
224 di->di_blocks = be64_to_cpu(str->di_blocks);
225 di->di_atime = be64_to_cpu(str->di_atime);
226 di->di_mtime = be64_to_cpu(str->di_mtime);
227 di->di_ctime = be64_to_cpu(str->di_ctime);
228 di->di_major = be32_to_cpu(str->di_major);
229 di->di_minor = be32_to_cpu(str->di_minor);
230
231 di->di_goal_meta = be64_to_cpu(str->di_goal_meta);
232 di->di_goal_data = be64_to_cpu(str->di_goal_data);
233 di->di_generation = be64_to_cpu(str->di_generation);
234
235 di->di_flags = be32_to_cpu(str->di_flags);
236 di->di_payload_format = be32_to_cpu(str->di_payload_format);
237 di->di_height = be16_to_cpu(str->di_height);
238
239 di->di_depth = be16_to_cpu(str->di_depth);
240 di->di_entries = be32_to_cpu(str->di_entries);
241
242 di->di_eattr = be64_to_cpu(str->di_eattr);
243}
244
211/** 245/**
212 * gfs2_inode_refresh - Refresh the incore copy of the dinode 246 * gfs2_inode_refresh - Refresh the incore copy of the dinode
213 * @ip: The GFS2 inode 247 * @ip: The GFS2 inode
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index edf87567bb2b..062a44f87fec 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -56,7 +56,7 @@ static void gfs2_inum_print(const struct gfs2_inum_host *no)
56 printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); 56 printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr);
57} 57}
58 58
59static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf) 59void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf)
60{ 60{
61 const struct gfs2_meta_header *str = buf; 61 const struct gfs2_meta_header *str = buf;
62 62
@@ -155,40 +155,6 @@ void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf)
155 qu->qu_value = be64_to_cpu(str->qu_value); 155 qu->qu_value = be64_to_cpu(str->qu_value);
156} 156}
157 157
158void gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
159{
160 struct gfs2_dinode_host *di = &ip->i_di;
161 const struct gfs2_dinode *str = buf;
162
163 gfs2_meta_header_in(&di->di_header, buf);
164 gfs2_inum_in(&di->di_num, &str->di_num);
165
166 di->di_mode = be32_to_cpu(str->di_mode);
167 di->di_uid = be32_to_cpu(str->di_uid);
168 di->di_gid = be32_to_cpu(str->di_gid);
169 di->di_nlink = be32_to_cpu(str->di_nlink);
170 di->di_size = be64_to_cpu(str->di_size);
171 di->di_blocks = be64_to_cpu(str->di_blocks);
172 di->di_atime = be64_to_cpu(str->di_atime);
173 di->di_mtime = be64_to_cpu(str->di_mtime);
174 di->di_ctime = be64_to_cpu(str->di_ctime);
175 di->di_major = be32_to_cpu(str->di_major);
176 di->di_minor = be32_to_cpu(str->di_minor);
177
178 di->di_goal_meta = be64_to_cpu(str->di_goal_meta);
179 di->di_goal_data = be64_to_cpu(str->di_goal_data);
180 di->di_generation = be64_to_cpu(str->di_generation);
181
182 di->di_flags = be32_to_cpu(str->di_flags);
183 di->di_payload_format = be32_to_cpu(str->di_payload_format);
184 di->di_height = be16_to_cpu(str->di_height);
185
186 di->di_depth = be16_to_cpu(str->di_depth);
187 di->di_entries = be32_to_cpu(str->di_entries);
188
189 di->di_eattr = be64_to_cpu(str->di_eattr);
190}
191
192void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) 158void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
193{ 159{
194 const struct gfs2_dinode_host *di = &ip->i_di; 160 const struct gfs2_dinode_host *di = &ip->i_di;
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h
index 08d8240ba533..4fc297a1ef95 100644
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -528,6 +528,7 @@ struct gfs2_quota_change_host {
528 528
529extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf); 529extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf);
530extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf); 530extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf);
531extern void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf);
531extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); 532extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf);
532extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); 533extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf);
533extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); 534extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf);
@@ -535,7 +536,6 @@ extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf);
535extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf); 536extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf);
536extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf); 537extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf);
537struct gfs2_inode; 538struct gfs2_inode;
538extern void gfs2_dinode_in(struct gfs2_inode *ip, const void *buf);
539extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); 539extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf);
540extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); 540extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf);
541extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); 541extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf);