From: BRIJESH SINGH <brij.singh@samsung.com>
To: dedekind@infradead.org
Cc: linux-mtd@lists.infradead.org
Subject: UBI Create or Update Volume
Date: Wed, 17 Jun 2009 09:33:04 +0000 (GMT) [thread overview]
Message-ID: <27450855.94721245231184009.JavaMail.weblogic@epml07> (raw)
Hi Artem,
Just came across the ubi_change_vtbl_record function. If first copy is written successfully and error occurs while writing second copy, this function still returns error. And hence the creation or change in Volume becomes unsuccessful. So applications consider it failure.
But if I unmount now, (clean or unclean) the first copy will become valid and second will be called corrupted (during mount time). It's not correct.
So should ubi_change_vtbl_record call flush wl and return success? Because 2nd copy(old) is unmapped till now.And should UBI go to read-only mode?
Code Snip:
Funct ubi_change_vtbl_record(){
...
for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) {
err = ubi_eba_unmap_leb(ubi, layout_vol, i);
if (err)
return err;
err = ubi_eba_write_leb(ubi, layout_vol, i, ubi->vtbl, 0,
ubi->vtbl_size, UBI_LONGTERM);
if (err)
return err;
}
...
}
Thanks
Brijesh
next reply other threads:[~2009-06-17 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 9:33 BRIJESH SINGH [this message]
2009-06-17 9:56 ` UBI Create or Update Volume Artem Bityutskiy
-- strict thread matches above, loose matches on Subject: below --
2009-06-17 13:33 BRIJESH SINGH
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=27450855.94721245231184009.JavaMail.weblogic@epml07 \
--to=brij.singh@samsung.com \
--cc=dedekind@infradead.org \
--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