From: Jelle Martijn Kok <jmkok@youcom.nl>
To: linux-mtd@lists.infradead.org
Subject: ubiupdatevol
Date: Wed, 15 Jul 2009 13:21:20 +0200 [thread overview]
Message-ID: <4A5DBBB0.9050203@youcom.nl> (raw)
Why is it not possible to write directly to a static volume ?
eg. perform "wget http://server.com/kernel.bin -O /dev/ubi0_2"
ubiupdatevol first performs a ioctl + UBI_IOCVOLUP (with the size) and
then starts writing normally. Why not allow for open, write, close
without this ioctl ?
This gives 2 related issues:
1) ubi_start_update must be called - which is normally called by
ioctl(fd, UBI_IOCVOLUP, &bytes). I could imagine that "ubi_start_update"
(upd.c) is called at the time the (static) volume is opened for writing.
(inside the "vol_cdev_open" in cdev.c)
2) the amount of bytes is not available/known on front. The amount of
bytes is store "vol->upd_bytes" which is used to limit and to know when
the amount of data to be written to an ubi volume has been reached. At
that time, the LEB is written and the update marker is removed.
However why not write the final LEB and remove the update marker inside
"vol_cdev_release". As a "vol_cdev_release" is (and should) always
follow the last write.
If you think this would be a correct change to UBI and also viable (am I
overlooking something ?) I would be willing to make the changes and sent
them to you (for inspection).
Jelle Martijn Kok
--
------------------------------------------------------------------------
You/Com Audiocommunicatie b.v.
Motorenweg 5k
2623CR Delft
The Netherlands
tel. : (+31)15 262 59 55
fax. : (+31)15 257 15 95
mail : jmkok@youcom.nl
http : http://www.youcom.nl
------------------------------------------------------------------------
next reply other threads:[~2009-07-15 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 11:21 Jelle Martijn Kok [this message]
2009-07-16 11:44 ` ubiupdatevol 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=4A5DBBB0.9050203@youcom.nl \
--to=jmkok@youcom.nl \
--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