Lines Matching refs:md
84 stripe_metadata_encode(const struct g_stripe_metadata *md, u_char *data)
87 bcopy(md->md_magic, data, sizeof(md->md_magic));
88 le32enc(data + 16, md->md_version);
89 bcopy(md->md_name, data + 20, sizeof(md->md_name));
90 le32enc(data + 36, md->md_id);
91 le16enc(data + 40, md->md_no);
92 le16enc(data + 42, md->md_all);
93 le32enc(data + 44, md->md_stripesize);
94 bcopy(md->md_provider, data + 48, sizeof(md->md_provider));
95 le64enc(data + 64, md->md_provsize);
98 stripe_metadata_decode(const u_char *data, struct g_stripe_metadata *md)
101 bcopy(data, md->md_magic, sizeof(md->md_magic));
102 md->md_version = le32dec(data + 16);
103 bcopy(data + 20, md->md_name, sizeof(md->md_name));
104 md->md_id = le32dec(data + 36);
105 md->md_no = le16dec(data + 40);
106 md->md_all = le16dec(data + 42);
107 md->md_stripesize = le32dec(data + 44);
108 bcopy(data + 48, md->md_provider, sizeof(md->md_provider));
109 md->md_provsize = le64dec(data + 64);