From: Alexander Schmidt <alexs@linux.vnet.ibm.com>
To: Artem <dedekind@infradead.org>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: [PATCH] [UBI] Resize of static volumes
Date: Fri, 15 Dec 2006 14:03:42 +0100 [thread overview]
Message-ID: <45829D2E.4060008@linux.vnet.ibm.com> (raw)
Hi,
I noticed that after resizing static volumes, the used_bytes value in the
data table record is set to the new size of the volume. This is correct
for dynamic volumes, but for static volumes, this value should not be
changed.
Kind regards,
Alexander Schmidt
Signed-off-by: Alexander Schmidt, <alexs at linux.vnet.ibm.com>
---
diff --git a/drivers/mtd/ubi/volmgmt.c b/drivers/mtd/ubi/volmgmt.c
index 750dfa1..cb9fbad 100644
--- a/drivers/mtd/ubi/volmgmt.c
+++ b/drivers/mtd/ubi/volmgmt.c
@@ -241,7 +241,7 @@ int ubi_vmt_rsvol(const struct ubi_info *ubi, int vol_id, int reserved_pebs)
if (err)
goto out_unlock;
- ubi_dtbl_set_dtr(ubi, vol_id, reserved_pebs * vtr->usable_leb_size);
+ ubi_dtbl_set_dtr(ubi, vol_id, dtr->used_bytes);
err = ubi_wl_erase_flush(ubi);
next reply other threads:[~2006-12-15 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 13:03 Alexander Schmidt [this message]
2006-12-15 13:41 ` [PATCH] [UBI] Resize of static volumes 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=45829D2E.4060008@linux.vnet.ibm.com \
--to=alexs@linux.vnet.ibm.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