[PATCH 0/3] UBI: block: Some fixes for static volumes

Ezequiel Garcia ezequiel.garcia at free-electrons.com
Fri Aug 29 14:42:27 PDT 2014


Hi all,

This patchset addresses some issues found when using static volumes
and playing with volume resize, update, and truncate operations.

The first patch changes the block interface to use the volume 'used_bytes'
which is the actual data size. It fixes a current issue with static volumes
which produces a nasty error when they are read past the data offset.

$ cat /dev/ubiblock0_0 > /dev/null
UBI error: ubiblock_read_to_buf: ubiblock0_0 ubi_read error -22
end_request: I/O error, dev ubiblock0_0, sector 9536
Buffer I/O error on device ubiblock0_0, logical block 2384
[snip]

It's an annoying error, but on the other side, it should never be produced
if the block is used to mount a file system, so I'm not sure it's serious
enough to go the -stable.

The second and third patches add the required changes for the block interface
to catch the "volume updated" notification. For static volumes, the
'used_bytes' parameter can be changed when updating the volume.

Comments and feedback welcome!

Ezequiel Garcia (3):
  UBI: block: Fix block device size setting
  UBI: block: Add support for the UBI_VOLUME_UPDATED notification
  UBI: Dispatch update notification if the volume is updated

 drivers/mtd/ubi/block.c | 24 ++++++++++++++++++------
 drivers/mtd/ubi/cdev.c  |  4 +++-
 2 files changed, 21 insertions(+), 7 deletions(-)

-- 
2.0.1




More information about the linux-mtd mailing list