Antoni Segura Puimedon 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): I didn't do that cause it is only for writing. I guess I could allow write and write binary modes. 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.'''