aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/scan.h')
-rw-r--r--drivers/mtd/ubi/scan.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h
index ff179ad7ca55..2576a8d1532b 100644
--- a/drivers/mtd/ubi/scan.h
+++ b/drivers/mtd/ubi/scan.h
@@ -91,10 +91,16 @@ struct ubi_scan_volume {
91 * @erase: list of physical eraseblocks which have to be erased 91 * @erase: list of physical eraseblocks which have to be erased
92 * @alien: list of physical eraseblocks which should not be used by UBI (e.g., 92 * @alien: list of physical eraseblocks which should not be used by UBI (e.g.,
93 * those belonging to "preserve"-compatible internal volumes) 93 * those belonging to "preserve"-compatible internal volumes)
94 * @used_peb_count: count of used PEBs
95 * @corr_peb_count: count of PEBs in the @corr list
96 * @read_err_count: count of PEBs read with error (%UBI_IO_BAD_HDR_READ was
97 * returned)
98 * @free_peb_count: count of PEBs in the @free list
99 * @erase_peb_count: count of PEBs in the @erase list
100 * @alien_peb_count: count of PEBs in the @alien list
94 * @bad_peb_count: count of bad physical eraseblocks 101 * @bad_peb_count: count of bad physical eraseblocks
95 * @vols_found: number of volumes found during scanning 102 * @vols_found: number of volumes found during scanning
96 * @highest_vol_id: highest volume ID 103 * @highest_vol_id: highest volume ID
97 * @alien_peb_count: count of physical eraseblocks in the @alien list
98 * @is_empty: flag indicating whether the MTD device is empty or not 104 * @is_empty: flag indicating whether the MTD device is empty or not
99 * @min_ec: lowest erase counter value 105 * @min_ec: lowest erase counter value
100 * @max_ec: highest erase counter value 106 * @max_ec: highest erase counter value
@@ -102,7 +108,6 @@ struct ubi_scan_volume {
102 * @mean_ec: mean erase counter value 108 * @mean_ec: mean erase counter value
103 * @ec_sum: a temporary variable used when calculating @mean_ec 109 * @ec_sum: a temporary variable used when calculating @mean_ec
104 * @ec_count: a temporary variable used when calculating @mean_ec 110 * @ec_count: a temporary variable used when calculating @mean_ec
105 * @corr_count: count of corrupted PEBs
106 * 111 *
107 * This data structure contains the result of scanning and may be used by other 112 * This data structure contains the result of scanning and may be used by other
108 * UBI sub-systems to build final UBI data structures, further error-recovery 113 * UBI sub-systems to build final UBI data structures, further error-recovery
@@ -114,10 +119,15 @@ struct ubi_scan_info {
114 struct list_head free; 119 struct list_head free;
115 struct list_head erase; 120 struct list_head erase;
116 struct list_head alien; 121 struct list_head alien;
122 int used_peb_count;
123 int corr_peb_count;
124 int read_err_count;
125 int free_peb_count;
126 int erase_peb_count;
127 int alien_peb_count;
117 int bad_peb_count; 128 int bad_peb_count;
118 int vols_found; 129 int vols_found;
119 int highest_vol_id; 130 int highest_vol_id;
120 int alien_peb_count;
121 int is_empty; 131 int is_empty;
122 int min_ec; 132 int min_ec;
123 int max_ec; 133 int max_ec;
@@ -125,7 +135,6 @@ struct ubi_scan_info {
125 int mean_ec; 135 int mean_ec;
126 uint64_t ec_sum; 136 uint64_t ec_sum;
127 int ec_count; 137 int ec_count;
128 int corr_count;
129}; 138};
130 139
131struct ubi_device; 140struct ubi_device;
@@ -135,7 +144,7 @@ struct ubi_vid_hdr;
135 * ubi_scan_move_to_list - move a PEB from the volume tree to a list. 144 * ubi_scan_move_to_list - move a PEB from the volume tree to a list.
136 * 145 *
137 * @sv: volume scanning information 146 * @sv: volume scanning information
138 * @seb: scanning eraseblock infprmation 147 * @seb: scanning eraseblock information
139 * @list: the list to move to 148 * @list: the list to move to
140 */ 149 */
141static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv, 150static inline void ubi_scan_move_to_list(struct ubi_scan_volume *sv,