Change in vdsm[master]: blockVolume: Fail if metadata overflows

nsoffer at redhat.com nsoffer at redhat.com
Sun Aug 30 10:56:33 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: blockVolume: Fail if metadata overflows
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/45472/2/vdsm/storage/blockVolume.py
File vdsm/storage/blockVolume.py:

Line 544:         metavol = lvm.lvPath(vgname, sd.METADATA)
Line 545:         with fileUtils.DirectFile(metavol, "r+d") as f:
Line 546:             data = "".join(lines)
Line 547:             if len(data) > VOLUME_METASIZE:
Line 548:                 raise se.MetadataOverflowError(data)
> additionally, please keep in mind that we need to support operations on vol
Right - while we must not corrupt the metadata, we must support existing disks with long description and old engines that send long description, so we may need to truncate the description field.
Line 549: 
Line 550:             data += "\0" * (VOLUME_METASIZE - len(data))
Line 551: 
Line 552:             f.seek(offs * VOLUME_METASIZE)


-- 
To view, visit https://gerrit.ovirt.org/45472
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ac286c68307e4a1925b9430a0b3b9909cdd682a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list