Yeela Kaplan has uploaded a new change for review. Change subject: Convert file metadata to use ioprocess for read/writes ......................................................................
Convert file metadata to use ioprocess for read/writes Change-Id: I86beb53885dc935ad473498208e486895eab8315 Signed-off-by: Yeela Kaplan <ykap...@redhat.com> --- M vdsm/storage/outOfProcess.py 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/27267/1 diff --git a/vdsm/storage/outOfProcess.py b/vdsm/storage/outOfProcess.py index f2de5f4..c864985 100644 --- a/vdsm/storage/outOfProcess.py +++ b/vdsm/storage/outOfProcess.py @@ -98,9 +98,19 @@ def __init__(self, iop): self._iop = iop + def rename(self, oldpath, newpath): + self._iop.rename(oldpath, newpath) + def statvfs(self, path): return self._iop.statvfs(path) + +def directReadLines(ioproc, path): + ioproc.readlines(path, direct=True) + + +def writeLines(ioproc, path, lines): + ioproc.writefile(path, lines) class _ModuleWrapper(types.ModuleType): def __init__(self, modName, procPool, ioproc, timeout, subModNames=()): @@ -127,6 +137,8 @@ self.glob = _ioprocessGlob(ioproc) self.fileUtils.validateAccess = \ _ioprocessFileUtils(ioproc).validateAccess + self.directReadLines = partial(directReadLines, ioproc) + self.writeLines = partial(writeLines, ioproc) def __getattr__(self, name): # Root modules is fake, we need to remove it -- To view, visit http://gerrit.ovirt.org/27267 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86beb53885dc935ad473498208e486895eab8315 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan <ykap...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches