Change in vdsm[master]: Convert file metadata to use ioprocess for read/writes

ykaplan at redhat.com ykaplan at redhat.com
Tue May 20 11:58:38 UTC 2014


Yeela Kaplan has posted comments on this change.

Change subject: Convert file metadata to use ioprocess for read/writes
......................................................................


Patch Set 6:

(3 comments)

http://gerrit.ovirt.org/#/c/27267/6/vdsm/storage/outOfProcess.py
File vdsm/storage/outOfProcess.py:

Line 99:             return self._iop.rename(oldpath, newpath)
Line 100:         except OSError as e:
Line 101:             if e.errno != errno.ENOTEMPTY:
Line 102:                 raise
Line 103: 
> Add warning in the log about how dangerous it is to rename folders.
Done
Line 104:         _IOProcessFileUtils(self._iop).cleanupdir(newpath, False)
Line 105:         self.mkdir(newpath)
Line 106:         for fname in self.listdir(oldpath):
Line 107:             src = os.path.join(oldpath, fname)


Line 115: 
Line 116: 
Line 117: def directReadLines(ioprocess, path):
Line 118:     fileStr = ioprocess.readfile(path, direct=True)
Line 119:     lines = fileStr.split('\n')
> fileStr.splitlines(True)
Done
Line 120:     return [l + '\n' for l in lines]
Line 121: 
Line 122: 
Line 123: def writeLines(ioprocess, path, lines):


Line 119:     lines = fileStr.split('\n')
Line 120:     return [l + '\n' for l in lines]
Line 121: 
Line 122: 
Line 123: def writeLines(ioprocess, path, lines):
> data = ''.join(lines)
Done
Line 124:     data = ''
Line 125:     for l in lines:
Line 126:         data += l
Line 127:     return ioprocess.writefile(path, data)


-- 
To view, visit http://gerrit.ovirt.org/27267
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86beb53885dc935ad473498208e486895eab8315
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list