[Devel] [PATCH RH7] ploop: Reread bat offsets and length before merge

Kirill Tkhai ktkhai at virtuozzo.com
Tue Dec 17 11:58:43 MSK 2019


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 at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 981978c0ee4a..280767f59995 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)




More information about the Devel mailing list