Update git submodules
* Update os-brick from branch 'master' to 0e3ab3bd7427408be100aa6210f142df0b97da89 - Merge "RBD: Improve IOWrapper's close & flush methods" - RBD: Improve IOWrapper's close & flush methods The RBDVolumeIOWrapper class inherits from io.RawIOBase but its close method doesn't flush and after being called the "closed" attribute still returns False. Trying to set the "closed" attribute ourselves in RBDVolumeIOWrapper.close results in an error, so we call the parent's implementation to do it. The parent's close method will also call the flush method. This change ensures that rbd_image.close is only called once, that the closed attribute is correct, and that the data is flushed on close. Without these changes we could have, unintentionally, multiple calls to the rbd_image.close method. If we called close on the wrapper ourselves, then when the Garbage Collector is cleaning up the wrapper it will call the io.RawIOBase finalizer that will see that the file is not closed and call close again. Now that we correctly set the closed flag on the instance, the flush method should also behave like the parent implementation and fail if it has already been closed. Change-Id: Ib3b066a7da071b1c2de78a1a4e569676539bd335
This commit is contained in:
parent
638d368d06
commit
dc5ca5f9ea
2
os-brick
2
os-brick
@ -1 +1 @@
|
||||
Subproject commit 5b62f84c630a43890c868adb9e31b406332c21a7
|
||||
Subproject commit 0e3ab3bd7427408be100aa6210f142df0b97da89
|
Loading…
Reference in New Issue
Block a user