diff options
author | Erik Troan <ewt@redhat.com> | 2001-03-16 19:44:18 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-03-16 19:44:18 +0000 |
commit | e4d825ee02cc04019da48f2a92d662c14116d588 (patch) | |
tree | 1c38941b15bd216d8549a3ea1cc0591a54e9e1e7 /isys/isys.py | |
parent | 05bed76b448d676bebb6d2e780fe14b974f76db2 (diff) | |
download | anaconda-e4d825ee02cc04019da48f2a92d662c14116d588.tar.gz anaconda-e4d825ee02cc04019da48f2a92d662c14116d588.tar.xz anaconda-e4d825ee02cc04019da48f2a92d662c14116d588.zip |
reference count raid
Diffstat (limited to 'isys/isys.py')
-rw-r--r-- | isys/isys.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py index 608f58297..627b07231 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -6,6 +6,7 @@ import os import os.path mountCount = {} +raidCount = {} MIN_RAM = _isys.MIN_RAM MIN_GUI_RAM = _isys.MIN_GUI_RAM @@ -24,6 +25,11 @@ def fsSpaceAvailable(fsystem): return _isys.devSpaceFree(fsystem) def raidstop(mdDevice): + if raidCount[mdDevice] > 1: + raidCount[mdDevice] = raidCount[mdDevice] - 1 + return + del raidCount[mdDevice] + makeDevInode(mdDevice, "/tmp/md") fd = os.open("/tmp/md", os.O_RDONLY) os.remove("/tmp/md") @@ -31,6 +37,12 @@ def raidstop(mdDevice): os.close(fd) def raidstart(mdDevice, aMember): + if raidCount.has_key(mdDevice) and raidCount[mdDevice]: + raidCount[mdDevice] = raidCount[mdDevice] + 1 + return + + raidCount[mdDevice] = 1 + makeDevInode(mdDevice, "/tmp/md") makeDevInode(aMember, "/tmp/member") fd = os.open("/tmp/md", os.O_RDONLY) |