Commit be1ba2bd authored by Iustin Pop's avatar Iustin Pop
Browse files

Improve speed of activating block devs

This patch fixes the double attach operation in bdev.AttachOrAssemble,
which was an indentation mistake in the first place.

Reviewed-by: imsnah
parent 3840729d
......@@ -2295,10 +2295,10 @@ def AttachOrAssemble(dev_type, unique_id, children):
device = DEV_MAP[dev_type](unique_id, children)
if not device.Attach():
device.Assemble()
if not device.Attach():
raise errors.BlockDeviceError("Can't find a valid block device for"
" %s/%s/%s" %
(dev_type, unique_id, children))
if not device.Attach():
raise errors.BlockDeviceError("Can't find a valid block device for"
" %s/%s/%s" %
(dev_type, unique_id, children))
return device
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment