Sergey Gotliv has posted comments on this change. Change subject: Fix calculation of file volume allocated size ......................................................................
Patch Set 1: (3 comments) .................................................... Commit Message Line 3: AuthorDate: 2013-11-21 01:04:30 +0200 Line 4: Commit: Sergey Gotliv <[email protected]> Line 5: CommitDate: 2013-11-21 01:32:59 +0200 Line 6: Line 7: Fix calculation of file volume allocated size. Done Line 8: Line 9: According to stat manual: Line 10: Line 11: st_blocks is the number of 512B blocks allocated. Line 14: it's value should be multiply by 512 instead of stat.st_blksize. Line 15: Line 16: On my environment a 4.5GB volume appeared in the Engine as 1176GB and Line 17: and I couldn't create additional disks on that storage domain because of Line 18: Engine validations. Done Line 19: Line 20: Change-Id: I71646199e2c0ac4564b832b8ebb202f49e289344 .................................................... File vdsm/storage/fileSD.py Line 300: stat = self.oop.os.stat(volPath) Line 301: Line 302: # According to stat manual st_blocks is the number of 512B Line 303: # blocks allocated therefore it should be multiply by 512 Line 304: # to get the allocated size Done, I copied the explanation for their code :-). Line 305: return stat.st_blocks * 512 Line 306: Line 307: @classmethod Line 308: def validateCreateVolumeParams(cls, volFormat, preallocate, srcVolUUID): -- To view, visit http://gerrit.ovirt.org/21490 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71646199e2c0ac4564b832b8ebb202f49e289344 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
