Dan Kenigsberg has posted comments on this change.
Change subject: BZ#836161 - Rewrite of deleteImage().
......................................................................
Patch Set 9: (4 inline comments)
....................................................
File vdsm/storage/blockSD.py
Line 185: dm = lvm.lvDmDev(sdUUID, volUUID)
Line 186: size = multipath.getDeviceSize(dm) # Bytes
Line 187: # TODO: Change for zero 128 M chuncks and log.
Line 188: # 128 M is the vdsm extent size default
Line 189: BS = constants.MEGAB # 1024 ** 2 = 1 MiB
no idea why I'm a side to this.
Line 190: count = size / BS
Line 191: cmd = tuple(constants.CMD_LOWPRIO)
Line 192: cmd += (constants.EXT_DD, "iflag=%s" % misc.DIRECTFLAG,
"if=/dev/zero",
Line 193: "of=%s" % os.path.join("/dev", sdUUID, volUUID),
Line 186: size = multipath.getDeviceSize(dm) # Bytes
Line 187: # TODO: Change for zero 128 M chuncks and log.
Line 188: # 128 M is the vdsm extent size default
Line 189: BS = constants.MEGAB # 1024 ** 2 = 1 MiB
Line 190: count = size / BS
but here BS is much much bigger than 512. The tail of the files would not be
erased.
Line 191: cmd = tuple(constants.CMD_LOWPRIO)
Line 192: cmd += (constants.EXT_DD, "iflag=%s" % misc.DIRECTFLAG,
"if=/dev/zero",
Line 193: "of=%s" % os.path.join("/dev", sdUUID, volUUID),
Line 194: "bs=%s" % BS, "count=%s" % count)
Line 256: sdUUID, toDelete, exc_info=True)
Line 257:
Line 258:
Line 259: log.debug("finished with VG:%s LVs: %s, img: %s", sdUUID,
volUUIDs, imgUUID)
Line 260: return
I think that Saggi frowns upon the meaningless "return" in the end.
Line 261:
Line 262:
Line 263: class VGTagMetadataRW(object):
Line 264: log = logging.getLogger("storage.Metadata.VGTagMetadataRW")
....................................................
File vdsm/storage/fileSD.py
Line 72: else:
Line 73: return domPaths[0]
Line 74:
Line 75:
Line 76: def getImagePath(sdUUID, imgUUID):
I do not see any evil in classmethods..
Line 77: return os.path.join(getDomPath(sdUUID), 'images', imgUUID)
Line 78:
Line 79:
Line 80: def getDomUuidFromMetafilePath(metafile):
--
To view, visit http://gerrit.ovirt.org/8506
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I304ff5cd70186ffc9789cd1ac9337efa6c5ff695
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Haim Ateya <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches