Lines Matching refs:reserved_pebs
71 ret = sprintf(buf, "%d\n", vol->reserved_pebs); in vol_attribute_show()
202 vol->reserved_pebs = div_u64(req->bytes + vol->usable_leb_size - 1, in ubi_create_volume()
206 if (vol->reserved_pebs > ubi->avail_pebs) { in ubi_create_volume()
215 ubi->avail_pebs -= vol->reserved_pebs; in ubi_create_volume()
216 ubi->rsvd_pebs += vol->reserved_pebs; in ubi_create_volume()
235 eba_tbl = ubi_eba_create_table(vol, vol->reserved_pebs); in ubi_create_volume()
244 vol->used_ebs = vol->reserved_pebs; in ubi_create_volume()
278 vtbl_rec.reserved_pebs = cpu_to_be32(vol->reserved_pebs); in ubi_create_volume()
314 ubi->rsvd_pebs -= vol->reserved_pebs; in ubi_create_volume()
315 ubi->avail_pebs += vol->reserved_pebs; in ubi_create_volume()
337 int i, err, vol_id = vol->vol_id, reserved_pebs = vol->reserved_pebs; in ubi_remove_volume() local
364 for (i = 0; i < vol->reserved_pebs; i++) { in ubi_remove_volume()
374 ubi->rsvd_pebs -= reserved_pebs; in ubi_remove_volume()
375 ubi->avail_pebs += reserved_pebs; in ubi_remove_volume()
404 int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) in ubi_resize_volume() argument
417 ubi->ubi_num, vol_id, vol->reserved_pebs, reserved_pebs); in ubi_resize_volume()
420 reserved_pebs < vol->used_ebs) { in ubi_resize_volume()
422 reserved_pebs, vol->used_ebs); in ubi_resize_volume()
427 if (reserved_pebs == vol->reserved_pebs) in ubi_resize_volume()
430 new_eba_tbl = ubi_eba_create_table(vol, reserved_pebs); in ubi_resize_volume()
443 pebs = reserved_pebs - vol->reserved_pebs; in ubi_resize_volume()
458 ubi_eba_copy_table(vol, new_eba_tbl, vol->reserved_pebs); in ubi_resize_volume()
465 err = ubi_eba_unmap_leb(ubi, vol, reserved_pebs + i); in ubi_resize_volume()
473 ubi_eba_copy_table(vol, new_eba_tbl, reserved_pebs); in ubi_resize_volume()
491 vtbl_rec.reserved_pebs = cpu_to_be32(reserved_pebs); in ubi_resize_volume()
496 vol->reserved_pebs = reserved_pebs; in ubi_resize_volume()
498 vol->used_ebs = reserved_pebs; in ubi_resize_volume()
631 int reserved_pebs, alignment, data_pad, vol_type, name_len, upd_marker; in self_check_volume() local
637 reserved_pebs = be32_to_cpu(ubi->vtbl[vol_id].reserved_pebs); in self_check_volume()
641 if (reserved_pebs) { in self_check_volume()
649 if (vol->reserved_pebs < 0 || vol->alignment < 0 || vol->data_pad < 0 || in self_check_volume()
682 if (vol->reserved_pebs > ubi->good_peb_count) { in self_check_volume()
711 if (vol->used_ebs != vol->reserved_pebs) { in self_check_volume()
729 if (vol->used_ebs < 0 || vol->used_ebs > vol->reserved_pebs) { in self_check_volume()