]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Handling Invalid argument iflag=direct in dd
authorSheel Rana <ranasheel2000@gmail.com>
Mon, 11 Jan 2016 20:06:46 +0000 (01:36 +0530)
committerSheel Rana <ranasheel2000@gmail.com>
Mon, 11 Jan 2016 20:08:33 +0000 (01:38 +0530)
commit5e363eb194e3d33e9a71b7f2f900e5c6dc13a0b1
tree4ba0dee7ed447a93f50952d67a56a5b93c806c5a
parent81f7986c16ecd589017486e60fb39544c5c409a8
Handling Invalid argument iflag=direct in dd

During volume/snapshot create/delete operations,
dd command is used to clear contents of disk.

Before invoking dd, it is checked if iflag=direct
supports dd or not by executing dd command with
iflag=direct and if=/dev/zero combination.
But this always results in invalid argument
error.

Handling for this argument is done to eliminate
unnecessary call to dd command when it is used
with iflag=direct and if=/dev/zero combination
to check if this argument supports dd or not.

Closes-Bug: #1270362

Change-Id: Ic6dd029ca1a339076e491c38ef3c69315497f189
cinder/tests/unit/test_volume_utils.py
cinder/volume/utils.py