public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] [UBI] Resize of static volumes
@ 2006-12-15 13:03 Alexander Schmidt
  2006-12-15 13:41 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Schmidt @ 2006-12-15 13:03 UTC (permalink / raw)
  To: Artem; +Cc: linux-mtd@lists.infradead.org

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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [UBI] Resize of static volumes
  2006-12-15 13:03 [PATCH] [UBI] Resize of static volumes Alexander Schmidt
@ 2006-12-15 13:41 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2006-12-15 13:41 UTC (permalink / raw)
  To: Alexander Schmidt; +Cc: linux-mtd@lists.infradead.org

Hello Alexander,

On Fri, 2006-12-15 at 14:03 +0100, Alexander Schmidt wrote:
> 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.

Thanks for the patch!

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-15 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-15 13:03 [PATCH] [UBI] Resize of static volumes Alexander Schmidt
2006-12-15 13:41 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox