Re: [patch] UBI: add means to clear ubi work queue for particularlnums

From: Artem Bityutskiy
Date: Mon May 14 2012 - 13:11:04 EST


On Sun, 2012-05-13 at 10:47 +0200, Joel Reardon wrote:
> This is the second part of a patch to allow UBI to force the erasure of
> particular logical eraseblock numbers. In this patch, a new function,
> ubi_lnum_purge, is added that allows the caller to synchronously erase all
> unmapped erase blocks whose LEB number corresponds to the parameter. This
> requires a previous patch that stores the LEB number in struct ubi_work.
>
> 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 three different LEBs. Then the
> new function was called to clear the queue for the three differnt LEB numbers
> one at a time. The work queue was dumped each time and the selective removal
> of the particular LEB numbers was observed.
>
> Calls to down_read(&ubi->work_sem) are not being done (unlike in
> do_work).. I'm not sure
> exactly where its needed / what it does, so perhaps someone can enlighten
> me.
>

Joel, I've just pushed patches from Richard which will conflict with
your patch-set. His patches are ready to go in right away so I took them
first. Please, re-base and re-send your changes.

I've re-based your "joel" branch against latest UBI/UBIFS stuff. Your
previous branch is now "joel_old".

Thanks!

--
Best Regards,
Artem Bityutskiy

Attachment: signature.asc
Description: This is a digitally signed message part