示例#1
0
文件: lvmcache.py 项目: geosharath/sm
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         lock = Lock(uuids[1], ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
示例#2
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         lock = Lock(uuids[1], ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
示例#3
0
文件: lvmcache.py 项目: xcp-ng/sm
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         # Taking this lock is needed to avoid a race condition
         # with tap-ctl open (which is now taking the same lock)
         lock = Lock("lvchange-p", ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
示例#4
0
文件: lvmcache.py 项目: chandrikas/sm
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         uuids = util.findall_uuid(path)
         ns = lvhdutil.NS_PREFIX_LVM + uuids[0]
         # Taking this lock is needed to avoid a race condition
         # with tap-ctl open (which is now taking the same lock)
         lock = Lock("lvchange-p", ns)
         lock.acquire()
         lvutil.setReadonly(path, readonly)
         lock.release()
         self.lvs[lvName].readonly = readonly
示例#5
0
文件: lvmcache.py 项目: BobBall/sm
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     if self.lvs[lvName].readonly != readonly:
         lvutil.setReadonly(path, readonly)
         self.lvs[lvName].readonly = readonly
示例#6
0
 def setReadonly(self, lvName, readonly):
     path = self._getPath(lvName)
     lvutil.setReadonly(path, readonly)
     self.lvs[lvName].readonly = readonly