aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>2012-05-16 23:23:22 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 13:26:01 -0400
commit227423d2416651abeafb5fd0c88c50eb0b99cb97 (patch)
treedd8ea55d4582573cfb3995b08f73e70f1adb8b19 /drivers/mtd/ubi/scan.h
parent97d6104bac24c30258748e200065559cd53b4b02 (diff)
UBI: rename struct ubi_scan_leb
Rename 'struct ubi_scan_leb' to 'struct ubi_ainf_leb'. This is part of the code re-structuring I am trying to do in order to add fastmap in a more logical way. Fastmap can share a lot with scanning, including the attach-time data structures, which all now have "scan" word in the name. Let's get rid of this word and use "ainf" instead which stands for "attach information". It has the same length as "scan" so re-naming is trivial. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.h')
-rw-r--r--drivers/mtd/ubi/scan.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h
index d48aef15ab5d..2cd66624dfa1 100644
--- a/drivers/mtd/ubi/scan.h
+++ b/drivers/mtd/ubi/scan.h
@@ -25,7 +25,7 @@
25#define UBI_SCAN_UNKNOWN_EC (-1) 25#define UBI_SCAN_UNKNOWN_EC (-1)
26 26
27/** 27/**
28 * struct ubi_scan_leb - scanning information about a physical eraseblock. 28 * struct ubi_ainf_peb - scanning information about a physical eraseblock.
29 * @ec: erase counter (%UBI_SCAN_UNKNOWN_EC if it is unknown) 29 * @ec: erase counter (%UBI_SCAN_UNKNOWN_EC if it is unknown)
30 * @pnum: physical eraseblock number 30 * @pnum: physical eraseblock number
31 * @lnum: logical eraseblock number 31 * @lnum: logical eraseblock number
@@ -33,13 +33,13 @@
33 * @copy_flag: this LEB is a copy (@copy_flag is set in VID header of this LEB) 33 * @copy_flag: this LEB is a copy (@copy_flag is set in VID header of this LEB)
34 * @sqnum: sequence number 34 * @sqnum: sequence number
35 * @u: unions RB-tree or @list links 35 * @u: unions RB-tree or @list links
36 * @u.rb: link in the per-volume RB-tree of &struct ubi_scan_leb objects 36 * @u.rb: link in the per-volume RB-tree of &struct ubi_ainf_peb objects
37 * @u.list: link in one of the eraseblock lists 37 * @u.list: link in one of the eraseblock lists
38 * 38 *
39 * One object of this type is allocated for each physical eraseblock during 39 * One object of this type is allocated for each physical eraseblock during
40 * scanning. 40 * scanning.
41 */ 41 */
42struct ubi_scan_leb { 42struct ubi_ainf_peb {
43 int ec; 43 int ec;
44 int pnum; 44 int pnum;
45 int lnum; 45 int lnum;
@@ -68,7 +68,7 @@ struct ubi_scan_leb {
68 * @compat: compatibility flags of this volume 68 * @compat: compatibility flags of this volume
69 * @rb: link in the volume RB-tree 69 * @rb: link in the volume RB-tree
70 * @root: root of the RB-tree containing all the eraseblock belonging to this 70 * @root: root of the RB-tree containing all the eraseblock belonging to this
71 * volume (&struct ubi_scan_leb objects) 71 * volume (&struct ubi_ainf_peb objects)
72 * 72 *
73 * One object of this type is allocated for each volume during scanning. 73 * One object of this type is allocated for each volume during scanning.
74 */ 74 */
@@ -109,7 +109,7 @@ struct ubi_scan_volume {
109 * @mean_ec: mean erase counter value 109 * @mean_ec: mean erase counter value
110 * @ec_sum: a temporary variable used when calculating @mean_ec 110 * @ec_sum: a temporary variable used when calculating @mean_ec
111 * @ec_count: a temporary variable used when calculating @mean_ec 111 * @ec_count: a temporary variable used when calculating @mean_ec
112 * @scan_leb_slab: slab cache for &struct ubi_scan_leb objects 112 * @scan_leb_slab: slab cache for &struct ubi_ainf_peb objects
113 * 113 *
114 * This data structure contains the result of scanning and may be used by other 114 * This data structure contains the result of scanning and may be used by other
115 * UBI sub-systems to build final UBI data structures, further error-recovery 115 * UBI sub-systems to build final UBI data structures, further error-recovery
@@ -149,7 +149,7 @@ struct ubi_vid_hdr;
149 * @list: the list to move to 149 * @list: the list to move to
150 */ 150 */
151static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv, 151static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv,
152 struct ubi_scan_leb *seb, 152 struct ubi_ainf_peb *seb,
153 struct list_head *list) 153 struct list_head *list)
154{ 154{
155 rb_erase(&seb->u.rb, &sv->root); 155 rb_erase(&seb->u.rb, &sv->root);
@@ -161,10 +161,10 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si,
161 int bitflips); 161 int bitflips);
162struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si, 162struct ubi_scan_volume *ubi_scan_find_sv(const struct ubi_scan_info *si,
163 int vol_id); 163 int vol_id);
164struct ubi_scan_leb *ubi_scan_find_seb(const struct ubi_scan_volume *sv, 164struct ubi_ainf_peb *ubi_scan_find_seb(const struct ubi_scan_volume *sv,
165 int lnum); 165 int lnum);
166void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv); 166void ubi_scan_rm_volume(struct ubi_scan_info *si, struct ubi_scan_volume *sv);
167struct ubi_scan_leb *ubi_scan_get_free_peb(struct ubi_device *ubi, 167struct ubi_ainf_peb *ubi_scan_get_free_peb(struct ubi_device *ubi,
168 struct ubi_scan_info *si); 168 struct ubi_scan_info *si);
169int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_scan_info *si, 169int ubi_scan_erase_peb(struct ubi_device *ubi, const struct ubi_scan_info *si,
170 int pnum, int ec); 170 int pnum, int ec);