| 1 | From 2b0db7309cf386899741b355efb12ab2742f178c Mon Sep 17 00:00:00 2001 |
| 2 | From: Lars-Peter Clausen <lars@metafoo.de> |
| 3 | Date: Sat, 26 Feb 2011 15:19:11 +0100 |
| 4 | Subject: [PATCH 1/4] ubi: Read only the vid header instead of the whole page |
| 5 | |
| 6 | Improves ubi attach time by ~1/2 |
| 7 | --- |
| 8 | drivers/mtd/ubi/io.c | 2 +- |
| 9 | 1 files changed, 1 insertions(+), 1 deletions(-) |
| 10 | |
| 11 | --- a/drivers/mtd/ubi/io.c |
| 12 | +++ b/drivers/mtd/ubi/io.c |
| 13 | @@ -979,7 +979,7 @@ int ubi_io_read_vid_hdr(struct ubi_devic |
| 14 | |
| 15 | p = (char *)vid_hdr - ubi->vid_hdr_shift; |
| 16 | err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset, |
| 17 | - ubi->vid_hdr_alsize); |
| 18 | + UBI_VID_HDR_SIZE + ubi->vid_hdr_shift); |
| 19 | if (err) { |
| 20 | if (err != UBI_IO_BITFLIPS && err != -EBADMSG) |
| 21 | return err; |
| 22 | |