aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-18 13:50:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-18 13:50:27 -0400
commit8f627a8a881481598c2591c3acc122fb9be7bac4 (patch)
tree06497d25e30824500aeaf8c736c45b070f121234 /include
parentfd57ed021990157ee5b3997c3f21c734093a9e23 (diff)
parent5d630e43284fdb0613e4e7e7dd906f27bc25b6af (diff)
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
* 'linux-next' of git://git.infradead.org/ubifs-2.6: (25 commits) UBIFS: clean-up commentaries UBIFS: save 128KiB or more RAM UBIFS: allocate orphans scan buffer on demand UBIFS: allocate lpt dump buffer on demand UBIFS: allocate ltab checking buffer on demand UBIFS: allocate scanning buffer on demand UBIFS: allocate dump buffer on demand UBIFS: do not check data crc by default UBIFS: simplify UBIFS Kconfig menu UBIFS: print max. index node size UBIFS: handle allocation failures in UBIFS write path UBIFS: use max_write_size during recovery UBIFS: use max_write_size for write-buffers UBIFS: introduce write-buffer size field UBI: incorporate LEB offset information UBIFS: incorporate maximum write size UBI: provide LEB offset information UBI: incorporate maximum write size UBIFS: fix LEB number in printk UBIFS: restrict world-writable debugfs files ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/ubi.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h
index b31bd9e9bca3..84854edf4436 100644
--- a/include/linux/mtd/ubi.h
+++ b/include/linux/mtd/ubi.h
@@ -116,18 +116,40 @@ struct ubi_volume_info {
116 * struct ubi_device_info - UBI device description data structure. 116 * struct ubi_device_info - UBI device description data structure.
117 * @ubi_num: ubi device number 117 * @ubi_num: ubi device number
118 * @leb_size: logical eraseblock size on this UBI device 118 * @leb_size: logical eraseblock size on this UBI device
119 * @leb_start: starting offset of logical eraseblocks within physical
120 * eraseblocks
119 * @min_io_size: minimal I/O unit size 121 * @min_io_size: minimal I/O unit size
122 * @max_write_size: maximum amount of bytes the underlying flash can write at a
123 * time (MTD write buffer size)
120 * @ro_mode: if this device is in read-only mode 124 * @ro_mode: if this device is in read-only mode
121 * @cdev: UBI character device major and minor numbers 125 * @cdev: UBI character device major and minor numbers
122 * 126 *
123 * Note, @leb_size is the logical eraseblock size offered by the UBI device. 127 * Note, @leb_size is the logical eraseblock size offered by the UBI device.
124 * Volumes of this UBI device may have smaller logical eraseblock size if their 128 * Volumes of this UBI device may have smaller logical eraseblock size if their
125 * alignment is not equivalent to %1. 129 * alignment is not equivalent to %1.
130 *
131 * The @max_write_size field describes flash write maximum write unit. For
132 * example, NOR flash allows for changing individual bytes, so @min_io_size is
133 * %1. However, it does not mean than NOR flash has to write data byte-by-byte.
134 * Instead, CFI NOR flashes have a write-buffer of, e.g., 64 bytes, and when
135 * writing large chunks of data, they write 64-bytes at a time. Obviously, this
136 * improves write throughput.
137 *
138 * Also, the MTD device may have N interleaved (striped) flash chips
139 * underneath, in which case @min_io_size can be physical min. I/O size of
140 * single flash chip, while @max_write_size can be N * @min_io_size.
141 *
142 * The @max_write_size field is always greater or equivalent to @min_io_size.
143 * E.g., some NOR flashes may have (@min_io_size = 1, @max_write_size = 64). In
144 * contrast, NAND flashes usually have @min_io_size = @max_write_size = NAND
145 * page size.
126 */ 146 */
127struct ubi_device_info { 147struct ubi_device_info {
128 int ubi_num; 148 int ubi_num;
129 int leb_size; 149 int leb_size;
150 int leb_start;
130 int min_io_size; 151 int min_io_size;
152 int max_write_size;
131 int ro_mode; 153 int ro_mode;
132 dev_t cdev; 154 dev_t cdev;
133}; 155};