From: Shivdas Gujare <shivdas.tech@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: read error with 64 byte erase counter header & 2048 Byte mtd->writesize
Date: Mon, 22 Feb 2010 16:00:19 -0800 [thread overview]
Message-ID: <cf70f0211002221600p1de3b271uba65cda8dbcf6b94@mail.gmail.com> (raw)
Hi all,
I am trying to use ubifs, but currently I am facing an issue as follows,
1) I tries to format a mtd device as, "ubiformat /dev/mtd0 -s 2048 -f
./ubi.img" while it return with an error of
ubiformat: mtd0 (nand), size 164757504 bytes (157.1 MiB), 1257
eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 0 -- 0 % complete libmtd: error!:
cannot read 64 bytes from mtd0 (eraseblock 0, offset 0)
error 22 (Invalid argument)
ubiformat: error!: failed to scan mtd0 (/dev/mtd0)
I tried to understand what it is and came to know that, "ret =
mtd_read(mtd, fd, eb, 0, &hdr, sizeof(struct ubi_ec_hdr));" from
"ubi-utils/src/libscan.c"
tried to read 64 byte "struct ubi_ec_hdr - UBI erase counter header"
while our MTD driver has set "mtd->writesize = 2048"
So this mismatch between 64 Byte "erase counter header" and 2048 Byte
"mtd->writesize" returns with an error.
I would like to know, Is this a real issue or am I missing any layer
between ubifs & mtd driver which interfaces this 64 & 2048 Byte
differences.
Thanks a lot for any help.
Thanks and Regards,
Shivdas Gujare
2)
next reply other threads:[~2010-02-23 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 0:00 Shivdas Gujare [this message]
2010-03-14 9:50 ` read error with 64 byte erase counter header & 2048 Byte mtd->writesize Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf70f0211002221600p1de3b271uba65cda8dbcf6b94@mail.gmail.com \
--to=shivdas.tech@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox