diff options
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 3a88cf1eaaa8..457710615261 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -158,15 +158,23 @@ struct ubi_volume_desc; | |||
158 | * @name: volume name | 158 | * @name: volume name |
159 | * | 159 | * |
160 | * @upd_ebs: how many eraseblocks are expected to be updated | 160 | * @upd_ebs: how many eraseblocks are expected to be updated |
161 | * @upd_bytes: how many bytes are expected to be received | 161 | * @ch_lnum: LEB number which is being changing by the atomic LEB change |
162 | * @upd_received: how many update bytes were already received | 162 | * operation |
163 | * @upd_buf: update buffer which is used to collect update data | 163 | * @ch_dtype: data persistency type which is being changing by the atomic LEB |
164 | * change operation | ||
165 | * @upd_bytes: how many bytes are expected to be received for volume update or | ||
166 | * atomic LEB change | ||
167 | * @upd_received: how many bytes were already received for volume update or | ||
168 | * atomic LEB change | ||
169 | * @upd_buf: update buffer which is used to collect update data or data for | ||
170 | * atomic LEB change | ||
164 | * | 171 | * |
165 | * @eba_tbl: EBA table of this volume (LEB->PEB mapping) | 172 | * @eba_tbl: EBA table of this volume (LEB->PEB mapping) |
166 | * @checked: %1 if this static volume was checked | 173 | * @checked: %1 if this static volume was checked |
167 | * @corrupted: %1 if the volume is corrupted (static volumes only) | 174 | * @corrupted: %1 if the volume is corrupted (static volumes only) |
168 | * @upd_marker: %1 if the update marker is set for this volume | 175 | * @upd_marker: %1 if the update marker is set for this volume |
169 | * @updating: %1 if the volume is being updated | 176 | * @updating: %1 if the volume is being updated |
177 | * @changing_leb: %1 if the atomic LEB change ioctl command is in progress | ||
170 | * | 178 | * |
171 | * @gluebi_desc: gluebi UBI volume descriptor | 179 | * @gluebi_desc: gluebi UBI volume descriptor |
172 | * @gluebi_refcount: reference count of the gluebi MTD device | 180 | * @gluebi_refcount: reference count of the gluebi MTD device |
@@ -202,6 +210,8 @@ struct ubi_volume { | |||
202 | char name[UBI_VOL_NAME_MAX+1]; | 210 | char name[UBI_VOL_NAME_MAX+1]; |
203 | 211 | ||
204 | int upd_ebs; | 212 | int upd_ebs; |
213 | int ch_lnum; | ||
214 | int ch_dtype; | ||
205 | long long upd_bytes; | 215 | long long upd_bytes; |
206 | long long upd_received; | 216 | long long upd_received; |
207 | void *upd_buf; | 217 | void *upd_buf; |
@@ -211,9 +221,14 @@ struct ubi_volume { | |||
211 | int corrupted:1; | 221 | int corrupted:1; |
212 | int upd_marker:1; | 222 | int upd_marker:1; |
213 | int updating:1; | 223 | int updating:1; |
224 | int changing_leb:1; | ||
214 | 225 | ||
215 | #ifdef CONFIG_MTD_UBI_GLUEBI | 226 | #ifdef CONFIG_MTD_UBI_GLUEBI |
216 | /* Gluebi-related stuff may be compiled out */ | 227 | /* |
228 | * Gluebi-related stuff may be compiled out. | ||
229 | * TODO: this should not be built into UBI but should be a separate | ||
230 | * ubimtd driver which works on top of UBI and emulates MTD devices. | ||
231 | */ | ||
217 | struct ubi_volume_desc *gluebi_desc; | 232 | struct ubi_volume_desc *gluebi_desc; |
218 | int gluebi_refcount; | 233 | int gluebi_refcount; |
219 | struct mtd_info gluebi_mtd; | 234 | struct mtd_info gluebi_mtd; |
@@ -427,6 +442,10 @@ int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol, | |||
427 | long long bytes); | 442 | long long bytes); |
428 | int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol, | 443 | int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol, |
429 | const void __user *buf, int count); | 444 | const void __user *buf, int count); |
445 | int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, | ||
446 | const struct ubi_leb_change_req *req); | ||
447 | int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol, | ||
448 | const void __user *buf, int count); | ||
430 | 449 | ||
431 | /* misc.c */ | 450 | /* misc.c */ |
432 | int ubi_calc_data_len(const struct ubi_device *ubi, const void *buf, int length); | 451 | int ubi_calc_data_len(const struct ubi_device *ubi, const void *buf, int length); |