Lines Matching full:av

179 	struct ubi_ainf_volume *av;  in add_vol()  local
181 av = ubi_add_av(ai, vol_id); in add_vol()
182 if (IS_ERR(av)) in add_vol()
183 return av; in add_vol()
185 av->data_pad = data_pad; in add_vol()
186 av->last_data_size = last_eb_bytes; in add_vol()
187 av->compat = 0; in add_vol()
188 av->vol_type = vol_type; in add_vol()
189 if (av->vol_type == UBI_STATIC_VOLUME) in add_vol()
190 av->used_ebs = used_ebs; in add_vol()
193 return av; in add_vol()
201 * @av: target scan volume
205 struct ubi_ainf_volume *av) in assign_aeb_to_av() argument
208 struct rb_node **p = &av->root.rb_node, *parent = NULL; in assign_aeb_to_av()
226 av->leb_count++; in assign_aeb_to_av()
229 rb_insert_color(&aeb->u.rb, &av->root); in assign_aeb_to_av()
236 * @av: the volume this LEB belongs to
243 struct ubi_ainf_volume *av, struct ubi_vid_hdr *new_vh, in update_vol() argument
246 struct rb_node **p = &av->root.rb_node, *parent = NULL; in update_vol()
286 if (av->highest_lnum == be32_to_cpu(new_vh->lnum)) in update_vol()
287 av->last_data_size = in update_vol()
291 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
303 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
311 if (av->highest_lnum <= be32_to_cpu(new_vh->lnum)) { in update_vol()
312 av->highest_lnum = be32_to_cpu(new_vh->lnum); in update_vol()
313 av->last_data_size = be32_to_cpu(new_vh->data_size); in update_vol()
316 if (av->vol_type == UBI_STATIC_VOLUME) in update_vol()
317 av->used_ebs = be32_to_cpu(new_vh->used_ebs); in update_vol()
319 av->leb_count++; in update_vol()
322 rb_insert_color(&new_aeb->u.rb, &av->root); in update_vol()
341 struct ubi_ainf_volume *av; in process_pool_aeb() local
350 av = ubi_find_av(ai, vol_id); in process_pool_aeb()
351 if (!av) { in process_pool_aeb()
357 ubi_assert(vol_id == av->vol_id); in process_pool_aeb()
359 return update_vol(ubi, ai, av, new_vh, new_aeb); in process_pool_aeb()
372 struct ubi_ainf_volume *av; in unmap_peb() local
376 ubi_rb_for_each_entry(node, av, &ai->volumes, rb) { in unmap_peb()
377 ubi_rb_for_each_entry(node2, aeb, &av->root, u.rb) { in unmap_peb()
379 rb_erase(&aeb->u.rb, &av->root); in unmap_peb()
380 av->leb_count--; in unmap_peb()
522 struct ubi_ainf_volume *av; in count_fastmap_pebs() local
532 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) in count_fastmap_pebs()
533 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) in count_fastmap_pebs()
553 struct ubi_ainf_volume *av; in ubi_attach_fastmap() local
704 av = add_vol(ai, be32_to_cpu(fmvhdr->vol_id), in ubi_attach_fastmap()
710 if (IS_ERR(av)) { in ubi_attach_fastmap()
711 if (PTR_ERR(av) == -EEXIST) in ubi_attach_fastmap()
755 if (av->highest_lnum <= aeb->lnum) in ubi_attach_fastmap()
756 av->highest_lnum = aeb->lnum; in ubi_attach_fastmap()
758 assign_aeb_to_av(ai, aeb, av); in ubi_attach_fastmap()
761 aeb->pnum, aeb->lnum, av->vol_id); in ubi_attach_fastmap()