Change in vdsm[master]: Added utility to ensure that files written to the file syste...

gvallare at redhat.com gvallare at redhat.com
Sun Jun 9 10:24:32 UTC 2013


Giuseppe Vallarelli has posted comments on this change.

Change subject: Added utility to ensure that files written to the file system happen atomically.
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File vdsm/utils.py
Line 855:     def __unicode__(self):
Line 856:         return unicode(self.cmd)
Line 857: 
Line 858: @contextmanager
Line 859: def atomicWrite(targetFile):
You're decorating the open builtin behavior, you should use the same interface of open, by passing filename and mode, what do you think?
Line 860:     '''Context manager that makes the write happen to a temporary file and if
Line 861:     and only it is successful, overwrites the original file. It creates the
Line 862:     temporary file in the same directory of the destination file, as rename is
Line 863:     only atomic within the same filesystem.'''


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibecd61d6746231a5a8cb17bad9a3302b01454f27
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list