From: Artem Bityutskiy <dedekind1@gmail.com>
To: Anatolij Gustschin <agust@denx.de>
Cc: MTD list <linux-mtd@lists.infradead.org>
Subject: [PATCH v3 2/7] UBI: provide LEB offset information
Date: Tue, 8 Mar 2011 10:32:43 +0200 [thread overview]
Message-ID: <1299573168-27760-3-git-send-email-dedekind1@gmail.com> (raw)
In-Reply-To: <1299573168-27760-1-git-send-email-dedekind1@gmail.com>
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Provide the LEB offset information in the UBI device information data
structure. This piece of information is required by UBIFS to find out
what are the LEB offsets which are aligned to the max. write size.
If LEB offset not aligned to max. write size, then UBIFS has to take
this into account to write more optimally.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
drivers/mtd/ubi/kapi.c | 1 +
include/linux/mtd/ubi.h | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 701df4f..d39716e 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -40,6 +40,7 @@ void ubi_do_get_device_info(struct ubi_device *ubi, struct ubi_device_info *di)
{
di->ubi_num = ubi->ubi_num;
di->leb_size = ubi->leb_size;
+ di->leb_start = ubi->leb_start;
di->min_io_size = ubi->min_io_size;
di->max_write_size = ubi->max_write_size;
di->ro_mode = ubi->ro_mode;
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h
index 36c7059..84854ed 100644
--- a/include/linux/mtd/ubi.h
+++ b/include/linux/mtd/ubi.h
@@ -116,6 +116,8 @@ struct ubi_volume_info {
* struct ubi_device_info - UBI device description data structure.
* @ubi_num: ubi device number
* @leb_size: logical eraseblock size on this UBI device
+ * @leb_start: starting offset of logical eraseblocks within physical
+ * eraseblocks
* @min_io_size: minimal I/O unit size
* @max_write_size: maximum amount of bytes the underlying flash can write at a
* time (MTD write buffer size)
@@ -145,6 +147,7 @@ struct ubi_volume_info {
struct ubi_device_info {
int ubi_num;
int leb_size;
+ int leb_start;
int min_io_size;
int max_write_size;
int ro_mode;
--
1.7.2.3
next prev parent reply other threads:[~2011-03-08 8:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 8:32 [PATCH v3 0/7] UBIFS: fix recovery on CFI NOR Artem Bityutskiy
2011-03-08 8:32 ` [PATCH v3 1/7] UBI: incorporate maximum write size Artem Bityutskiy
2011-03-08 8:32 ` Artem Bityutskiy [this message]
2011-03-08 8:32 ` [PATCH v3 3/7] UBIFS: " Artem Bityutskiy
2011-03-08 8:32 ` [PATCH v3 4/7] UBI: incorporate LEB offset information Artem Bityutskiy
2011-03-08 8:32 ` [PATCH v3 5/7] UBIFS: introduce write-buffer size field Artem Bityutskiy
2011-03-08 8:32 ` [PATCH v3 6/7] UBIFS: use max_write_size for write-buffers Artem Bityutskiy
2011-03-08 8:32 ` [PATCH v3 7/7] UBIFS: use max_write_size during recovery 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=1299573168-27760-3-git-send-email-dedekind1@gmail.com \
--to=dedekind1@gmail.com \
--cc=agust@denx.de \
--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