[RHEL7,COMMIT] ploop: Reread bat offsets and length before merge

Submitted by Konstantin Khorenko on Dec. 17, 2019, 9:45 a.m.

Details

Message ID 201912170945.xBH9jFTv029897@finist-ce7.sw.ru
State New
Series "ploop: Reread bat offsets and length before merge"
Headers show

Commit Message

Konstantin Khorenko Dec. 17, 2019, 9:45 a.m.
The commit is pushed to "branch-rh7-3.10.0-1062.7.1.vz7.130.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.7.1.vz7.130.4
------>
commit 1b95865c609a4cad3e1d938bacf4d6893d4d61c0
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Tue Dec 17 12:45:14 2019 +0300

    ploop: Reread bat offsets and length before merge
    
    New top delta may growth. This time base delta's
    BAT may be updated from userspace, so we have to
    reread new position of holes.
    
    https://jira.sw.ru/browse/PSBM-100441
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 981978c0ee4ad..280767f59995e 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -598,6 +598,8 @@  ploop1_start_merge(struct ploop_delta * delta, struct ploop_snapdata * sd)
 		return err;
 
 	ph->bd_size = get_SizeInSectors_from_le(vh, delta->plo->fmt_version);
+	ph->l1_off = le32_to_cpu(vh->m_FirstBlockOffset);
+	ph->nr_bat_entries = le32_to_cpu(vh->m_Size);
 
 	err = delta->io.ops->sync(&delta->io);
 	if (err)