summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/io_paral.c
diff options
context:
space:
mode:
authorlinux-mtd-owner@lists.infradead.org <linux-mtd-owner@lists.infradead.org>2009-02-11 04:04:39 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-02-11 14:17:34 +0200
commitf372be0ab34ebcf0d2ff61bff143b6bac1e9607e (patch)
treed3501c06a9acf6ca87c2b13a740e97af7d38d2c8 /tests/ubi-tests/io_paral.c
parentf466e8cbb0da6379c832f14168f89282e3133f64 (diff)
I have here a mtd part which is 3 GiB with a flash page size of 256KiB.
The 2GiB limit is at erase block 8192. In mtd_is_bad() the computation for the MEMGETBADBLOCK ioctl() looks like the following: | seek = eb * mtd->eb_size; with both eb and mtd->eb_size being a signed int results in seek being a signed result. The _FILE_OFFSET_BITS=64 define is required to switch off_t from 32bit to 64bit an 32bit systems. This is required in order to keep using lseek() as lseek64 on 32bit system. Without this change lseek() in mtd_read() is called with a 32bit value with most significat bit set and the kernel performs a sign extension for the 64bit value which is used in the mtd layer. The last change also changes the size of the parameter which is passed to the MEMGETBADBLOCK ioctl() from 32 to 64bit. The counter part in kernel is also defined as loff_t which is of type __kernel_loff_t and this is "long long". So this must have been broken for a while unless I missed something. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/ubi-tests/io_paral.c')
0 files changed, 0 insertions, 0 deletions