Federico Simoncelli has posted comments on this change. Change subject: Fix calculation of file volume allocated size ......................................................................
Patch Set 2: (1 comment) .................................................... File vdsm/storage/fileSD.py Line 300: stat = self.oop.os.stat(volPath) Line 301: Line 302: # The st_blocks field indicates the number of blocks Line 303: # allocated to the file, in 512-byte units. Line 304: return stat.st_blocks * 512 In a future refactor I don't want this to be mistakenly aggregated with block size (or sector size). It should be clear that it's related to stat(2). Eventually we can do more research and see in the kernel where this value is coming from (to see if it really comes from the sector size). Anyway, what about something like this at the top of this module (or even better in constants.py?): # Specific stat(2) block size as defined in the man page STAT_BLOCK_SIZE = 512 Line 305: Line 306: @classmethod Line 307: def validateCreateVolumeParams(cls, volFormat, preallocate, srcVolUUID): Line 308: """ -- 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: 2 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
