Eduardo has posted comments on this change.
Change subject: getVolumeInfo() new implementation. ......................................................................
Patch Set 3:
(2 comments)
.................................................... Commit Message Line 5: CommitDate: 2013-09-16 04:46:09 +0300 Line 6: Line 7: getVolumeInfo() new implementation. Line 8: Line 9: BC compatibility preserved but in broken behaviours. The former semantic was incosistent but preserved.
Logical impossibilities were removed if it was possible. Line 10: Line 11: Required to reduce the volume size functions proliferation. Line 12: Line 13: Change-Id: Iedcfd84cd0848fbe3aca9f9af45c44c17722055e
.................................................... File vdsm/storage/volume.py Line 895: else: Line 896: info = self.metadata2info(meta) Line 897: info["capacity"] = str(int(info["size"]) * BLOCK_SIZE) # Virtual Line 898: del info["size"] # Remove the virtual (by volMD) size [blocks] Line 899: if info['mtime'] == "" and self.__class__.__name__ == "FileVolume": They are operating on different files. Therefore we should not unify.
Unfortunately this info dict is created only here and mix information of multiple sources and is created only here. Line 900: info['mtime'] = self.oop.os.stat(self.volumePath).st_mtime Line 901: # If image was set to illegal, mark the status same Line 902: # (because of VDC constraints) Line 903: if info['legality'] == ILLEGAL_VOL: