projects
/
tools
/
bmap-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34c0521
)
BmapCopy: restore the block device settings
author
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Mon, 14 Jan 2013 14:46:42 +0000
(16:46 +0200)
committer
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Mon, 14 Jan 2013 14:46:42 +0000
(16:46 +0200)
Always restore the block device settings at the end.
Change-Id: I04ba70598b2e9616d22790248795a460ec710400
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCopy.py
patch
|
blob
|
history
diff --git
a/bmaptools/BmapCopy.py
b/bmaptools/BmapCopy.py
index
dbd2a07
..
7082287
100644
(file)
--- a/
bmaptools/BmapCopy.py
+++ b/
bmaptools/BmapCopy.py
@@
-574,12
+574,14
@@
class BmapBdevCopy(BmapCopy):
very bad user experience, and we work around this effect by
synchronizing from time to time. """
+ self._tune_block_device()
+
try:
- self._tune_block_device()
BmapCopy.copy(self, sync, verify)
except:
- self._restore_bdev_settings()
raise
+ finally:
+ self._restore_bdev_settings()
def __init__(self, image, dest, bmap = None, image_size = None):
""" The same as the constructor of the 'BmapCopy' base class, but adds