Lines Matching full:md

40 virstor_metadata_encode(struct g_virstor_metadata *md, unsigned char *data)  in virstor_metadata_encode()  argument
46 bs_write_buf(&bs, md->md_magic, sizeof(md->md_magic)); in virstor_metadata_encode()
47 bs_write_u32(&bs, md->md_version); in virstor_metadata_encode()
48 bs_write_buf(&bs, md->md_name, sizeof(md->md_name)); in virstor_metadata_encode()
49 bs_write_u64(&bs, md->md_virsize); in virstor_metadata_encode()
50 bs_write_u32(&bs, md->md_chunk_size); in virstor_metadata_encode()
51 bs_write_u32(&bs, md->md_id); in virstor_metadata_encode()
52 bs_write_u16(&bs, md->md_count); in virstor_metadata_encode()
54 bs_write_buf(&bs, md->provider, sizeof(md->provider)); in virstor_metadata_encode()
55 bs_write_u16(&bs, md->no); in virstor_metadata_encode()
56 bs_write_u64(&bs, md->provsize); in virstor_metadata_encode()
57 bs_write_u32(&bs, md->chunk_count); in virstor_metadata_encode()
58 bs_write_u32(&bs, md->chunk_next); in virstor_metadata_encode()
59 bs_write_u16(&bs, md->chunk_reserved); in virstor_metadata_encode()
60 bs_write_u16(&bs, md->flags); in virstor_metadata_encode()
68 virstor_metadata_decode(unsigned char *data, struct g_virstor_metadata *md) in virstor_metadata_decode() argument
74 bs_read_buf(&bs, md->md_magic, sizeof(md->md_magic)); in virstor_metadata_decode()
75 md->md_version = bs_read_u32(&bs); in virstor_metadata_decode()
76 bs_read_buf(&bs, md->md_name, sizeof(md->md_name)); in virstor_metadata_decode()
77 md->md_virsize = bs_read_u64(&bs); in virstor_metadata_decode()
78 md->md_chunk_size = bs_read_u32(&bs); in virstor_metadata_decode()
79 md->md_id = bs_read_u32(&bs); in virstor_metadata_decode()
80 md->md_count = bs_read_u16(&bs); in virstor_metadata_decode()
82 bs_read_buf(&bs, md->provider, sizeof(md->provider)); in virstor_metadata_decode()
83 md->no = bs_read_u16(&bs); in virstor_metadata_decode()
84 md->provsize = bs_read_u64(&bs); in virstor_metadata_decode()
85 md->chunk_count = bs_read_u32(&bs); in virstor_metadata_decode()
86 md->chunk_next = bs_read_u32(&bs); in virstor_metadata_decode()
87 md->chunk_reserved = bs_read_u16(&bs); in virstor_metadata_decode()
88 md->flags = bs_read_u16(&bs); in virstor_metadata_decode()