提交 e928a76f 编写于 作者: A Al Viro 提交者: Steven Whitehouse

[GFS2] split and annotate gfs2_meta_header

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 2a2c9824
...@@ -54,7 +54,7 @@ static void gfs2_inum_print(const struct gfs2_inum *no) ...@@ -54,7 +54,7 @@ static void gfs2_inum_print(const struct gfs2_inum *no)
printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr);
} }
static void gfs2_meta_header_in(struct gfs2_meta_header *mh, const void *buf) static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *buf)
{ {
const struct gfs2_meta_header *str = buf; const struct gfs2_meta_header *str = buf;
...@@ -63,7 +63,7 @@ static void gfs2_meta_header_in(struct gfs2_meta_header *mh, const void *buf) ...@@ -63,7 +63,7 @@ static void gfs2_meta_header_in(struct gfs2_meta_header *mh, const void *buf)
mh->mh_format = be32_to_cpu(str->mh_format); mh->mh_format = be32_to_cpu(str->mh_format);
} }
static void gfs2_meta_header_out(const struct gfs2_meta_header *mh, void *buf) static void gfs2_meta_header_out(const struct gfs2_meta_header_host *mh, void *buf)
{ {
struct gfs2_meta_header *str = buf; struct gfs2_meta_header *str = buf;
...@@ -72,7 +72,7 @@ static void gfs2_meta_header_out(const struct gfs2_meta_header *mh, void *buf) ...@@ -72,7 +72,7 @@ static void gfs2_meta_header_out(const struct gfs2_meta_header *mh, void *buf)
str->mh_format = cpu_to_be32(mh->mh_format); str->mh_format = cpu_to_be32(mh->mh_format);
} }
static void gfs2_meta_header_print(const struct gfs2_meta_header *mh) static void gfs2_meta_header_print(const struct gfs2_meta_header_host *mh)
{ {
pv(mh, mh_magic, "0x%.8X"); pv(mh, mh_magic, "0x%.8X");
pv(mh, mh_type, "%u"); pv(mh, mh_type, "%u");
......
...@@ -89,6 +89,12 @@ struct gfs2_meta_header { ...@@ -89,6 +89,12 @@ struct gfs2_meta_header {
__be32 __pad1; /* Was incarnation number in gfs1 */ __be32 __pad1; /* Was incarnation number in gfs1 */
}; };
struct gfs2_meta_header_host {
__u32 mh_magic;
__u32 mh_type;
__u32 mh_format;
};
/* /*
* super-block structure * super-block structure
* *
...@@ -129,7 +135,7 @@ struct gfs2_sb { ...@@ -129,7 +135,7 @@ struct gfs2_sb {
}; };
struct gfs2_sb_host { struct gfs2_sb_host {
struct gfs2_meta_header sb_header; struct gfs2_meta_header_host sb_header;
__u32 sb_fs_format; __u32 sb_fs_format;
__u32 sb_multihost_format; __u32 sb_multihost_format;
...@@ -194,7 +200,7 @@ struct gfs2_rgrp { ...@@ -194,7 +200,7 @@ struct gfs2_rgrp {
}; };
struct gfs2_rgrp_host { struct gfs2_rgrp_host {
struct gfs2_meta_header rg_header; struct gfs2_meta_header_host rg_header;
__u32 rg_flags; __u32 rg_flags;
__u32 rg_free; __u32 rg_free;
...@@ -297,7 +303,7 @@ struct gfs2_dinode { ...@@ -297,7 +303,7 @@ struct gfs2_dinode {
}; };
struct gfs2_dinode_host { struct gfs2_dinode_host {
struct gfs2_meta_header di_header; struct gfs2_meta_header_host di_header;
struct gfs2_inum di_num; struct gfs2_inum di_num;
...@@ -406,7 +412,7 @@ struct gfs2_log_header { ...@@ -406,7 +412,7 @@ struct gfs2_log_header {
}; };
struct gfs2_log_header_host { struct gfs2_log_header_host {
struct gfs2_meta_header lh_header; struct gfs2_meta_header_host lh_header;
__u64 lh_sequence; /* Sequence number of this transaction */ __u64 lh_sequence; /* Sequence number of this transaction */
__u32 lh_flags; /* GFS2_LOG_HEAD_... */ __u32 lh_flags; /* GFS2_LOG_HEAD_... */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册