1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-28 08:13:21 +02:00
openwrt-xburst/target/linux/xburst/patches-2.6.37/901-ubi-Read-only-the-vid-header-instead-of-the-whole-pa.patch
Xiangfu Liu 06082c3b5a [xburst] Improve mounttime
This patchset optimizes nand read access and reduces the ubi attach time by ~2/3
Credits go to dvdk for having the idea.
2011-07-01 13:24:58 +04:00

12 lines
390 B
Diff

--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -995,7 +995,7 @@ int ubi_io_read_vid_hdr(struct ubi_devic
p = (char *)vid_hdr - ubi->vid_hdr_shift;
read_err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset,
- ubi->vid_hdr_alsize);
+ UBI_VID_HDR_SIZE + ubi->vid_hdr_shift);
if (read_err && read_err != UBI_IO_BITFLIPS && read_err != -EBADMSG)
return read_err;