Lines Matching full:av
188 struct ubi_ainf_volume *av; in add_vol() local
190 av = ubi_add_av(ai, vol_id); in add_vol()
191 if (IS_ERR(av)) in add_vol()
192 return av; in add_vol()
194 av->data_pad = data_pad; in add_vol()
195 av->last_data_size = last_eb_bytes; in add_vol()
196 av->compat = 0; in add_vol()
197 av->vol_type = vol_type; in add_vol()
198 if (av->vol_type == UBI_STATIC_VOLUME) in add_vol()
199 av->used_ebs = used_ebs; in add_vol()
202 return av; in add_vol()
210 * @av: target scan volume
214 struct ubi_ainf_volume *av) in assign_aeb_to_av() argument
217 struct rb_node **p = &av->root.rb_node, *parent = NULL; in assign_aeb_to_av()
235 av->leb_count++; in assign_aeb_to_av()
238 rb_insert_color(&aeb->u.rb, &av->root); in assign_aeb_to_av()
245 * @av: the volume this LEB belongs to
252 struct ubi_ainf_volume *av, struct ubi_vid_hdr *new_vh, in update_vol() argument
255 struct rb_node **p = &av->root.rb_node, *parent = NULL; in update_vol()
295 if (av->highest_lnum == be32_to_cpu(new_vh->lnum)) in update_vol()
296 av->last_data_size = in update_vol()
300 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
312 av->vol_id, aeb->lnum, new_aeb->pnum); in update_vol()
320 if (av->highest_lnum <= be32_to_cpu(new_vh->lnum)) { in update_vol()
321 av->highest_lnum = be32_to_cpu(new_vh->lnum); in update_vol()
322 av->last_data_size = be32_to_cpu(new_vh->data_size); in update_vol()
325 if (av->vol_type == UBI_STATIC_VOLUME) in update_vol()
326 av->used_ebs = be32_to_cpu(new_vh->used_ebs); in update_vol()
328 av->leb_count++; in update_vol()
331 rb_insert_color(&new_aeb->u.rb, &av->root); in update_vol()
350 struct ubi_ainf_volume *av; in process_pool_aeb() local
359 av = ubi_find_av(ai, vol_id); in process_pool_aeb()
360 if (!av) { in process_pool_aeb()
366 ubi_assert(vol_id == av->vol_id); in process_pool_aeb()
368 return update_vol(ubi, ai, av, new_vh, new_aeb); in process_pool_aeb()
381 struct ubi_ainf_volume *av; in unmap_peb() local
385 ubi_rb_for_each_entry(node, av, &ai->volumes, rb) { in unmap_peb()
386 ubi_rb_for_each_entry(node2, aeb, &av->root, u.rb) { in unmap_peb()
388 rb_erase(&aeb->u.rb, &av->root); in unmap_peb()
389 av->leb_count--; in unmap_peb()
529 struct ubi_ainf_volume *av; in count_fastmap_pebs() local
539 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) in count_fastmap_pebs()
540 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) in count_fastmap_pebs()
560 struct ubi_ainf_volume *av; in ubi_attach_fastmap() local
703 av = add_vol(ai, be32_to_cpu(fmvhdr->vol_id), in ubi_attach_fastmap()
709 if (IS_ERR(av)) { in ubi_attach_fastmap()
710 if (PTR_ERR(av) == -EEXIST) in ubi_attach_fastmap()
754 if (av->highest_lnum <= aeb->lnum) in ubi_attach_fastmap()
755 av->highest_lnum = aeb->lnum; in ubi_attach_fastmap()
757 assign_aeb_to_av(ai, aeb, av); in ubi_attach_fastmap()
760 aeb->pnum, aeb->lnum, av->vol_id); in ubi_attach_fastmap()