UBI : Atomic change LEB

Artem Bityutskiy dedekind at infradead.org
Thu Sep 13 11:46:30 EDT 2007


On Thu, 2007-09-13 at 15:38 +0100, Jamie Lokier wrote:
> Could you use a read-write lock, instead of a mutex?
> 
> Lock for "read" (meaning shared) when writing to the MTD device.  Lock
> for "write" (meaning exclusive) when erasing.  Then all erases are
> serialised, and writes can go in parallel.
> 
> Would that solve the locking problems?
> 
> If a device can support multiple erases in parallel as well, then
> you'd want something more complicated.

Usual LEB read/write/erase _already_ have per-LEB RW locking which is
actually even too much. We are talking only about LEB atomic change
operation, which is special.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list