2525 * headers and providing complete information about the UBI flash image.
2626 *
2727 * The scanning information is represented by a &struct ubi_scan_info' object.
28- * Information about found volumes is represented by &struct ubi_scan_volume
28+ * Information about found volumes is represented by &struct ubi_ainf_volume
2929 * objects which are kept in volume RB-tree with root at the @volumes field.
3030 * The RB-tree is indexed by the volume ID.
3131 *
3232 * Scanned logical eraseblocks are represented by &struct ubi_ainf_peb objects.
3333 * These objects are kept in per-volume RB-trees with the root at the
34- * corresponding &struct ubi_scan_volume object. To put it differently, we keep
34+ * corresponding &struct ubi_ainf_volume object. To put it differently, we keep
3535 * an RB-tree of per-volume objects and each of these objects is the root of
3636 * RB-tree of per-eraseblock objects.
3737 *
@@ -180,7 +180,7 @@ static int add_corrupted(struct ubi_scan_info *si, int pnum, int ec)
180180 * headers of the same volume.
181181 */
182182static int validate_vid_hdr (const struct ubi_vid_hdr * vid_hdr ,
183- const struct ubi_scan_volume * sv , int pnum )
183+ const struct ubi_ainf_volume * sv , int pnum )
184184{
185185 int vol_type = vid_hdr -> vol_type ;
186186 int vol_id = be32_to_cpu (vid_hdr -> vol_id );
@@ -244,19 +244,19 @@ static int validate_vid_hdr(const struct ubi_vid_hdr *vid_hdr,
244244 * to the scanning volume object in case of success and a negative error code
245245 * in case of failure.
246246 */
247- static struct ubi_scan_volume * add_volume (struct ubi_scan_info * si , int vol_id ,
247+ static struct ubi_ainf_volume * add_volume (struct ubi_scan_info * si , int vol_id ,
248248 int pnum ,
249249 const struct ubi_vid_hdr * vid_hdr )
250250{
251- struct ubi_scan_volume * sv ;
251+ struct ubi_ainf_volume * sv ;
252252 struct rb_node * * p = & si -> volumes .rb_node , * parent = NULL ;
253253
254254 ubi_assert (vol_id == be32_to_cpu (vid_hdr -> vol_id ));
255255
256256 /* Walk the volume RB-tree to look if this volume is already present */
257257 while (* p ) {
258258 parent = * p ;
259- sv = rb_entry (parent , struct ubi_scan_volume , rb );
259+ sv = rb_entry (parent , struct ubi_ainf_volume , rb );
260260
261261 if (vol_id == sv -> vol_id )
262262 return sv ;
@@ -268,7 +268,7 @@ static struct ubi_scan_volume *add_volume(struct ubi_scan_info *si, int vol_id,
268268 }
269269
270270 /* The volume is absent - add it */
271- sv = kmalloc (sizeof (struct ubi_scan_volume ), GFP_KERNEL );
271+ sv = kmalloc (sizeof (struct ubi_ainf_volume ), GFP_KERNEL );
272272 if (!sv )
273273 return ERR_PTR (- ENOMEM );
274274
@@ -446,7 +446,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
446446{
447447 int err , vol_id , lnum ;
448448 unsigned long long sqnum ;
449- struct ubi_scan_volume * sv ;
449+ struct ubi_ainf_volume * sv ;
450450 struct ubi_ainf_peb * seb ;
451451 struct rb_node * * p , * parent = NULL ;
452452
@@ -593,14 +593,14 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
593593 * This function returns a pointer to the volume description or %NULL if there
594594 * are no data about this volume in the scanning information.
595595 */
596- struct ubi_scan_volume * ubi_scan_find_sv (const struct ubi_scan_info * si ,
596+ struct ubi_ainf_volume * ubi_scan_find_sv (const struct ubi_scan_info * si ,
597597 int vol_id )
598598{
599- struct ubi_scan_volume * sv ;
599+ struct ubi_ainf_volume * sv ;
600600 struct rb_node * p = si -> volumes .rb_node ;
601601
602602 while (p ) {
603- sv = rb_entry (p , struct ubi_scan_volume , rb );
603+ sv = rb_entry (p , struct ubi_ainf_volume , rb );
604604
605605 if (vol_id == sv -> vol_id )
606606 return sv ;
@@ -622,7 +622,7 @@ struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
622622 * This function returns a pointer to the scanning logical eraseblock or %NULL
623623 * if there are no data about it in the scanning volume information.
624624 */
625- struct ubi_ainf_peb * ubi_scan_find_seb (const struct ubi_scan_volume * sv ,
625+ struct ubi_ainf_peb * ubi_scan_find_seb (const struct ubi_ainf_volume * sv ,
626626 int lnum )
627627{
628628 struct ubi_ainf_peb * seb ;
@@ -648,7 +648,7 @@ struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
648648 * @si: scanning information
649649 * @sv: the volume scanning information to delete
650650 */
651- void ubi_scan_rm_volume (struct ubi_scan_info * si , struct ubi_scan_volume * sv )
651+ void ubi_scan_rm_volume (struct ubi_scan_info * si , struct ubi_ainf_volume * sv )
652652{
653653 struct rb_node * rb ;
654654 struct ubi_ainf_peb * seb ;
@@ -1147,7 +1147,7 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
11471147{
11481148 int err , pnum ;
11491149 struct rb_node * rb1 , * rb2 ;
1150- struct ubi_scan_volume * sv ;
1150+ struct ubi_ainf_volume * sv ;
11511151 struct ubi_ainf_peb * seb ;
11521152 struct ubi_scan_info * si ;
11531153
@@ -1244,7 +1244,7 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
12441244 * This function destroys the volume RB-tree (@sv->root) and the scanning
12451245 * volume information.
12461246 */
1247- static void destroy_sv (struct ubi_scan_info * si , struct ubi_scan_volume * sv )
1247+ static void destroy_sv (struct ubi_scan_info * si , struct ubi_ainf_volume * sv )
12481248{
12491249 struct ubi_ainf_peb * seb ;
12501250 struct rb_node * this = sv -> root .rb_node ;
@@ -1277,7 +1277,7 @@ static void destroy_sv(struct ubi_scan_info *si, struct ubi_scan_volume *sv)
12771277void ubi_scan_destroy_si (struct ubi_scan_info * si )
12781278{
12791279 struct ubi_ainf_peb * seb , * seb_tmp ;
1280- struct ubi_scan_volume * sv ;
1280+ struct ubi_ainf_volume * sv ;
12811281 struct rb_node * rb ;
12821282
12831283 list_for_each_entry_safe (seb , seb_tmp , & si -> alien , u .list ) {
@@ -1305,7 +1305,7 @@ void ubi_scan_destroy_si(struct ubi_scan_info *si)
13051305 else if (rb -> rb_right )
13061306 rb = rb -> rb_right ;
13071307 else {
1308- sv = rb_entry (rb , struct ubi_scan_volume , rb );
1308+ sv = rb_entry (rb , struct ubi_ainf_volume , rb );
13091309
13101310 rb = rb_parent (rb );
13111311 if (rb ) {
@@ -1337,7 +1337,7 @@ static int self_check_si(struct ubi_device *ubi, struct ubi_scan_info *si)
13371337{
13381338 int pnum , err , vols_found = 0 ;
13391339 struct rb_node * rb1 , * rb2 ;
1340- struct ubi_scan_volume * sv ;
1340+ struct ubi_ainf_volume * sv ;
13411341 struct ubi_ainf_peb * seb , * last_seb ;
13421342 uint8_t * buf ;
13431343
0 commit comments