pyocf: manage volume.opened in s_open
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
8e1fe9a263
commit
6c9f558b62
@ -187,7 +187,11 @@ class Volume:
|
||||
Volume._instances_[ref] = volume
|
||||
volume.handle = ref
|
||||
|
||||
return volume.do_open()
|
||||
ret = volume.do_open()
|
||||
if ret == 0:
|
||||
volume.opened = True
|
||||
|
||||
return ret
|
||||
|
||||
@classmethod
|
||||
def get_io_ops(cls):
|
||||
@ -255,7 +259,6 @@ class Volume:
|
||||
self.opened = False
|
||||
|
||||
def do_open(self):
|
||||
self.opened = True
|
||||
return 0
|
||||
|
||||
def close(self):
|
||||
|
Loading…
Reference in New Issue
Block a user