Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UBI: provide LEB offset information

Provide the LEB offset information in the UBI device information data
structure. This piece of information is required by UBIFS to find out
what are the LEB offsets which are aligned to the max. write size.

If LEB offset not aligned to max. write size, then UBIFS has to take
this into account to write more optimally.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

+4
+1
drivers/mtd/ubi/kapi.c
··· 40 40 { 41 41 di->ubi_num = ubi->ubi_num; 42 42 di->leb_size = ubi->leb_size; 43 + di->leb_start = ubi->leb_start; 43 44 di->min_io_size = ubi->min_io_size; 44 45 di->max_write_size = ubi->max_write_size; 45 46 di->ro_mode = ubi->ro_mode;
+3
include/linux/mtd/ubi.h
··· 116 116 * struct ubi_device_info - UBI device description data structure. 117 117 * @ubi_num: ubi device number 118 118 * @leb_size: logical eraseblock size on this UBI device 119 + * @leb_start: starting offset of logical eraseblocks within physical 120 + * eraseblocks 119 121 * @min_io_size: minimal I/O unit size 120 122 * @max_write_size: maximum amount of bytes the underlying flash can write at a 121 123 * time (MTD write buffer size) ··· 147 145 struct ubi_device_info { 148 146 int ubi_num; 149 147 int leb_size; 148 + int leb_start; 150 149 int min_io_size; 151 150 int max_write_size; 152 151 int ro_mode;