diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-01-30 18:37:33 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-08 10:12:48 +0200 |
commit | 30b542ef453e6832ff682170b2db95d7bca2fe70 (patch) | |
tree | a74ccffb6a4eebb6ec8f9d3aa2d152700f995830 /include | |
parent | 10ac27970274e9094aee84a6452a25bf1b7e59e1 (diff) | |
download | kernel_samsung_smdk4412-30b542ef453e6832ff682170b2db95d7bca2fe70.zip kernel_samsung_smdk4412-30b542ef453e6832ff682170b2db95d7bca2fe70.tar.gz kernel_samsung_smdk4412-30b542ef453e6832ff682170b2db95d7bca2fe70.tar.bz2 |
UBI: incorporate maximum write size
Incorporate MTD write buffer size into UBI device information
because UBIFS needs this field. UBI does not use it ATM, just
provides to upper layers in 'struct ubi_device_info'.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/ubi.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h index b31bd9e..36c7059 100644 --- a/include/linux/mtd/ubi.h +++ b/include/linux/mtd/ubi.h @@ -117,17 +117,36 @@ struct ubi_volume_info { * @ubi_num: ubi device number * @leb_size: logical eraseblock size on this UBI device * @min_io_size: minimal I/O unit size + * @max_write_size: maximum amount of bytes the underlying flash can write at a + * time (MTD write buffer size) * @ro_mode: if this device is in read-only mode * @cdev: UBI character device major and minor numbers * * Note, @leb_size is the logical eraseblock size offered by the UBI device. * Volumes of this UBI device may have smaller logical eraseblock size if their * alignment is not equivalent to %1. + * + * The @max_write_size field describes flash write maximum write unit. For + * example, NOR flash allows for changing individual bytes, so @min_io_size is + * %1. However, it does not mean than NOR flash has to write data byte-by-byte. + * Instead, CFI NOR flashes have a write-buffer of, e.g., 64 bytes, and when + * writing large chunks of data, they write 64-bytes at a time. Obviously, this + * improves write throughput. + * + * Also, the MTD device may have N interleaved (striped) flash chips + * underneath, in which case @min_io_size can be physical min. I/O size of + * single flash chip, while @max_write_size can be N * @min_io_size. + * + * The @max_write_size field is always greater or equivalent to @min_io_size. + * E.g., some NOR flashes may have (@min_io_size = 1, @max_write_size = 64). In + * contrast, NAND flashes usually have @min_io_size = @max_write_size = NAND + * page size. */ struct ubi_device_info { int ubi_num; int leb_size; int min_io_size; + int max_write_size; int ro_mode; dev_t cdev; }; |