Lines Matching refs:vm
186 static bool ldm_parse_vmdb (const u8 *data, struct vmdb *vm) in ldm_parse_vmdb() argument
188 BUG_ON (!data || !vm); in ldm_parse_vmdb()
195 vm->ver_major = get_unaligned_be16(data + 0x12); in ldm_parse_vmdb()
196 vm->ver_minor = get_unaligned_be16(data + 0x14); in ldm_parse_vmdb()
197 if ((vm->ver_major != 4) || (vm->ver_minor != 10)) { in ldm_parse_vmdb()
199 "Aborting.", 4, 10, vm->ver_major, vm->ver_minor); in ldm_parse_vmdb()
203 vm->vblk_size = get_unaligned_be32(data + 0x08); in ldm_parse_vmdb()
204 if (vm->vblk_size == 0) { in ldm_parse_vmdb()
209 vm->vblk_offset = get_unaligned_be32(data + 0x0C); in ldm_parse_vmdb()
210 vm->last_vblk_seq = get_unaligned_be32(data + 0x04); in ldm_parse_vmdb()
447 struct vmdb *vm; in ldm_validate_vmdb() local
452 vm = &ldb->vm; in ldm_validate_vmdb()
461 if (!ldm_parse_vmdb (data, vm)) in ldm_validate_vmdb()
470 if (vm->vblk_offset != 512) in ldm_validate_vmdb()
471 ldm_info ("VBLKs start at offset 0x%04x.", vm->vblk_offset); in ldm_validate_vmdb()
477 if ((vm->vblk_size * vm->last_vblk_seq) > (toc->bitmap1_size << 9)) { in ldm_validate_vmdb()
1348 if (!ldm_ldmdb_add (f->data, f->num*ldb->vm.vblk_size, ldb)) in ldm_frag_commit()
1377 size = ldb->vm.vblk_size; in ldm_get_vblks()
1379 skip = ldb->vm.vblk_offset >> 9; /* Bytes to sectors */ in ldm_get_vblks()
1380 finish = (size * ldb->vm.last_vblk_seq) >> 9; in ldm_get_vblks()