UBI: Fastmap: Calc fastmap size correctly
[sfrench/cifs-2.6.git] / drivers / mtd / ubi / ubi.h
index 7bf416329c1973ee58b6c3511f90c8aecc5a997a..320fc38fa2a1508cd0a0db2e5c9da19ed7291789 100644 (file)
@@ -439,7 +439,8 @@ struct ubi_debug_info {
  *          @move_to, @move_to_put @erase_pending, @wl_scheduled, @works,
  *          @erroneous, and @erroneous_peb_count fields
  * @move_mutex: serializes eraseblock moves
- * @work_sem: synchronizes the WL worker with use tasks
+ * @work_sem: used to wait for all the scheduled works to finish and prevent
+ * new works from being submitted
  * @wl_scheduled: non-zero if the wear-leveling was scheduled
  * @lookuptbl: a table to quickly find a &struct ubi_wl_entry object for any
  *             physical eraseblock
@@ -713,14 +714,15 @@ struct ubi_attach_info {
  * @torture: if the physical eraseblock has to be tortured
  * @anchor: produce a anchor PEB to by used by fastmap
  *
- * The @func pointer points to the worker function. If the @cancel argument is
- * not zero, the worker has to free the resources and exit immediately. The
- * worker has to return zero in case of success and a negative error code in
+ * The @func pointer points to the worker function. If the @shutdown argument is
+ * not zero, the worker has to free the resources and exit immediately as the
+ * WL sub-system is shutting down.
+ * The worker has to return zero in case of success and a negative error code in
  * case of failure.
  */
 struct ubi_work {
        struct list_head list;
-       int (*func)(struct ubi_device *ubi, struct ubi_work *wrk, int cancel);
+       int (*func)(struct ubi_device *ubi, struct ubi_work *wrk, int shutdown);
        /* The below fields are only relevant to erasure works */
        struct ubi_wl_entry *e;
        int vol_id;