New mechanism for loop device allocation
authorGui Chen <gui.chen@intel.com>
Thu, 15 Mar 2012 10:07:47 +0000 (18:07 +0800)
committerGui Chen <gui.chen@intel.com>
Thu, 15 Mar 2012 10:07:47 +0000 (18:07 +0800)
commitd35ca289aa5adf749451b58f1bc49b1ee995f717
tree7ba38c4f94e53544a6fcaaf5596b3cf27dbc838e
parentde6e1e0f0ca945bdbf36c05a631b46db3aaae69b
New mechanism for loop device allocation

1. get loopdev id, 10<id<100, considered raw image would use symlink (id>100)
2. create loopdev, if exists, use when free, or raise when used
3. return loopdev name, used by the caller
4. cleanup when mic exit, including dm table, losetup list

Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/fs_related.py