void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf) { const struct gfs2_sb *str = buf; gfs2_meta_header_in(&sb->sb_header, buf); sb->sb_fs_format = be32_to_cpu(str->sb_fs_format); sb->sb_multihost_format = be32_to_cpu(str->sb_multihost_format); sb->sb_bsize = be32_to_cpu(str->sb_bsize); sb->sb_bsize_shift = be32_to_cpu(str->sb_bsize_shift); gfs2_inum_in(&sb->sb_master_dir, (char *)&str->sb_master_dir); gfs2_inum_in(&sb->sb_root_dir, (char *)&str->sb_root_dir); memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN); memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); }
/** * gfs1_rgrp_in - read in a gfs1 rgrp */ static void gfs1_rgrp_in(struct gfs_rgrp *rgrp, struct gfs2_buffer_head *rbh) { struct gfs_rgrp *str = (struct gfs_rgrp *)rbh->b_data; gfs2_meta_header_in(&rgrp->rg_header, rbh); rgrp->rg_flags = be32_to_cpu(str->rg_flags); rgrp->rg_free = be32_to_cpu(str->rg_free); rgrp->rg_useddi = be32_to_cpu(str->rg_useddi); rgrp->rg_freedi = be32_to_cpu(str->rg_freedi); gfs2_inum_in(&rgrp->rg_freedi_list, (char *)&str->rg_freedi_list); rgrp->rg_usedmeta = be32_to_cpu(str->rg_usedmeta); rgrp->rg_freemeta = be32_to_cpu(str->rg_freemeta); memcpy(rgrp->rg_reserved, str->rg_reserved, 64); }