Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305171
b: refs/heads/master
c: 517af48
h: refs/heads/master
i:
  305169: eb3e971
  305167: a21d982
v: v3
  • Loading branch information
Artem Bityutskiy committed May 20, 2012
1 parent 91fc6db commit efcf8ea
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 183 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4e6042f1d073073f88e0ad6d2a7450da9a3937d
refs/heads/master: 517af48c0540e61bbe0ebbb5f463afe937b73894
22 changes: 11 additions & 11 deletions trunk/drivers/mtd/ubi/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,20 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx)
}

/**
* ubi_dump_sv - dump a &struct ubi_ainf_volume object.
* @sv: the object to dump
* ubi_dump_av - dump a &struct ubi_ainf_volume object.
* @av: the object to dump
*/
void ubi_dump_sv(const struct ubi_ainf_volume *sv)
void ubi_dump_av(const struct ubi_ainf_volume *av)
{
printk(KERN_DEBUG "Volume attaching information dump:\n");
printk(KERN_DEBUG "\tvol_id %d\n", sv->vol_id);
printk(KERN_DEBUG "\thighest_lnum %d\n", sv->highest_lnum);
printk(KERN_DEBUG "\tleb_count %d\n", sv->leb_count);
printk(KERN_DEBUG "\tcompat %d\n", sv->compat);
printk(KERN_DEBUG "\tvol_type %d\n", sv->vol_type);
printk(KERN_DEBUG "\tused_ebs %d\n", sv->used_ebs);
printk(KERN_DEBUG "\tlast_data_size %d\n", sv->last_data_size);
printk(KERN_DEBUG "\tdata_pad %d\n", sv->data_pad);
printk(KERN_DEBUG "\tvol_id %d\n", av->vol_id);
printk(KERN_DEBUG "\thighest_lnum %d\n", av->highest_lnum);
printk(KERN_DEBUG "\tleb_count %d\n", av->leb_count);
printk(KERN_DEBUG "\tcompat %d\n", av->compat);
printk(KERN_DEBUG "\tvol_type %d\n", av->vol_type);
printk(KERN_DEBUG "\tused_ebs %d\n", av->used_ebs);
printk(KERN_DEBUG "\tlast_data_size %d\n", av->last_data_size);
printk(KERN_DEBUG "\tdata_pad %d\n", av->data_pad);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/ubi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);

void ubi_dump_vol_info(const struct ubi_volume *vol);
void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx);
void ubi_dump_sv(const struct ubi_ainf_volume *sv);
void ubi_dump_av(const struct ubi_ainf_volume *av);
void ubi_dump_aeb(const struct ubi_ainf_peb *aeb, int type);
void ubi_dump_mkvol_req(const struct ubi_mkvol_req *req);
int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset,
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ static void print_rsvd_warning(struct ubi_device *ubi,
int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *ai)
{
int i, j, err, num_volumes;
struct ubi_ainf_volume *sv;
struct ubi_ainf_volume *av;
struct ubi_volume *vol;
struct ubi_ainf_peb *aeb;
struct rb_node *rb;
Expand Down Expand Up @@ -1246,17 +1246,17 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_attach_info *ai)
for (j = 0; j < vol->reserved_pebs; j++)
vol->eba_tbl[j] = UBI_LEB_UNMAPPED;

sv = ubi_scan_find_sv(ai, idx2vol_id(ubi, i));
if (!sv)
av = ubi_scan_find_av(ai, idx2vol_id(ubi, i));
if (!av)
continue;

ubi_rb_for_each_entry(rb, aeb, &sv->root, u.rb) {
ubi_rb_for_each_entry(rb, aeb, &av->root, u.rb) {
if (aeb->lnum >= vol->reserved_pebs)
/*
* This may happen in case of an unclean reboot
* during re-size.
*/
ubi_scan_move_to_list(sv, aeb, &ai->erase);
ubi_scan_move_to_list(av, aeb, &ai->erase);
vol->eba_tbl[aeb->lnum] = aeb->pnum;
}
}
Expand Down
Loading

0 comments on commit efcf8ea

Please sign in to comment.