1
linux/drivers/mtd/ubi
Joel Reardon 62f384552b UBI: modify ubi_wl_flush function to clear work queue for a lnum
This patch modifies ubi_wl_flush to force the erasure of
particular volume id / logical eraseblock number pairs. Previous functionality
is preserved when passing UBI_ALL for both values. The locations where ubi_wl_flush
were called are appropriately changed: ubi_leb_erase only flushes for the
erased LEB, and ubi_create_volume forces only flushing for its volume id.
External code can call this new feature via the new function ubi_flush() added
to kapi.c, which simply passes through to ubi_wl_flush().

This was tested by disabling the call to do_work in ubi thread, which results
in the work queue remaining unless explicitly called to remove. UBIFS was
changed to call ubifs_leb_change 50 times for four different LEBs. Then the
new function was called to clear the queue: passing wrong volume ids / lnum,
correct ones, and finally UBI_ALL for both to ensure it was finally all
cleard. The work queue was dumped each time and the selective removal
of the particular LEB numbers was observed. Extra checks were enabled and
ubifs's integck was also run. Finally, the drive was repeatedly filled and
emptied to ensure that the queue was cleared normally.

Artem: amended the patch.

Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-21 11:34:41 +03:00
..
attach.c UBI: add volume id struct ubi_ainf_peb 2012-05-21 11:34:41 +03:00
build.c UBI: move and rename attach_by_scanning 2012-05-20 20:26:04 +03:00
cdev.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
debug.c UBI: rename sv to av 2012-05-20 20:26:02 +03:00
debug.h UBI: rename sv to av 2012-05-20 20:26:02 +03:00
eba.c UBI: add lnum and vol_id to struct ubi_work 2012-05-21 11:34:41 +03:00
gluebi.c UBI: Kill data type hint 2012-05-20 20:25:59 +03:00
io.c UBI: amend comments after all the renamings 2012-05-20 20:26:04 +03:00
kapi.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
Kconfig UBI: remove Kconfig debugging option 2012-05-20 20:26:00 +03:00
Makefile UBI: rename scan.c to attach.c 2012-05-20 21:01:28 +03:00
misc.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
ubi-media.h UBI: add in hex the value for UBI_INTERNAL_VOL_START to comment 2012-05-20 21:30:45 +03:00
ubi.h UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
upd.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
vmt.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00
vtbl.c UBI: amend comments after all the renamings 2012-05-20 20:26:04 +03:00
wl.c UBI: modify ubi_wl_flush function to clear work queue for a lnum 2012-05-21 11:34:41 +03:00