diff options
author | Joel Reardon <joel@clambassador.com> | 2012-05-18 09:40:24 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-21 04:34:41 -0400 |
commit | d36e59e69b8be536c55d6118630f0221cee5ccee (patch) | |
tree | 8ffa8feec4ddbfeca391278c449c5ba1b3e78d2e /drivers/mtd/ubi/ubi.h | |
parent | 6dd3bc7e6032ffb392477fadca77172c1c9e346b (diff) |
UBI: add lnum and vol_id to struct ubi_work
This is part of a multipart patch to allow UBI to force the erasure of
particular logical eraseblock numbers. In this patch, the volume id and LEB
number are added to ubi_work data structure, and both are also passed as a
parameter to schedule erase to set it appropriately. Whenever ubi_wl_put_peb
is called, the lnum is also passed to be forwarded to schedule erase. Later,
a new ubi_sync_lnum will be added to execute immediately all work related to
that lnum.
This was tested by outputting the vol_id and lnum during the schedule of
erasure. The ubi thread was disabled and two ubifs drives on separate
partitions repeated changed a small number of LEBs. The ubi module was readded,
and all the erased LEBs, corresponding to the volumes, were added to the
schedule erase queue.
Artem: minor tweaks
Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index b4b3913f1df4..5e1182ca289b 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -667,7 +667,8 @@ int ubi_eba_init(struct ubi_device *ubi, struct ubi_attach_info *ai); | |||
667 | 667 | ||
668 | /* wl.c */ | 668 | /* wl.c */ |
669 | int ubi_wl_get_peb(struct ubi_device *ubi); | 669 | int ubi_wl_get_peb(struct ubi_device *ubi); |
670 | int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture); | 670 | int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum, |
671 | int pnum, int torture); | ||
671 | int ubi_wl_flush(struct ubi_device *ubi); | 672 | int ubi_wl_flush(struct ubi_device *ubi); |
672 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); | 673 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); |
673 | int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai); | 674 | int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai); |