Skip to contentSkip to conversation

Resize of static volumes

PATCH In review Alexander Schmidt 2 participants 2 messages Dec 15, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Resize of static volumes

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>

---

drivers/mtd/ubi/volmgmt.c +1 -1
index 750dfa1..cb9fbad 100644
@@ -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);
#1 lore raw

Hello Alexander,

Quoted 4 lines · Alexander Schmidt

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!

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)