Mark Wu has posted comments on this change.
Change subject: Add lvm.lvPhysDev() to get the physical LV device.
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm/storage/lvm.py
Line 1156: def lvPath(vgName, lvName):
Line 1157: return os.path.join("/dev", vgName, lvName)
Line 1158:
Line 1159: def lvPhysDev(vgName, lvName):
Line 1160: """Return the LV physical device.
I think the function name and comment are a little confusing. This function
returns device mapper device. It's a kind of virtual block device built on the
real physical device. Why do you call it physical device? How about lvDmDev?
Line 1161:
Line 1162: returns: dm-X
Line 1163: The LV should be active.
Line 1164: """
Line 1159: def lvPhysDev(vgName, lvName):
Line 1160: """Return the LV physical device.
Line 1161:
Line 1162: returns: dm-X
Line 1163: The LV should be active.
Does it mean the caller should validate it's active? If yes, I think we should
clarify it more clearly.
Line 1164: """
Line 1165:
Line 1166: lvp = lvPath(vgName, lvName)
Line 1167: return os.path.basename(os.readlink(lvp))
--
To view, visit http://gerrit.ovirt.org/8751
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d3286589ea02025713d10d85a9892024f586b73
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches