]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
SMBFS: Fix retrieving total allocated size
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 17 Feb 2015 16:28:07 +0000 (18:28 +0200)
committerPetrut Lucian <lpetrut@cloudbasesolutions.com>
Thu, 22 Oct 2015 18:08:58 +0000 (18:08 +0000)
commit667c1dc511f40854a8bc5ce62ea1461735ba8fc2
treeff5d8f932427d393c60121ea418184ec6c6d2850
parent9ba2d75a5af665f14549787c88a79e30283304f4
SMBFS: Fix retrieving total allocated size

Currently, the Windows SMBFS driver parses all the VHD/X images
present on the configured share in order to retrieve the allocated
size. Not only that this can be slow when having many volumes, but
it can also fail in certain environments when the images are in use.

The Linux SMBFS driver uses 'du', which gives incorrect values in
case of VHD/X images.

In order to avoid this, the driver can keep track of the allocated
size according to each share, the most basic solution being a JSON
stored in a file.

As the Windows SMBFS driver inherits the Linux SMBFS driver, only
overwriting the os specific methods, the fix is applied to the base
SMBFS driver.

DocImpact

Closes-Bug: #1425100

Change-Id: I14aa7b001605ae14fe0b6d0a45ee6b1abf8c4f60
cinder/tests/unit/test_smbfs.py
cinder/tests/unit/windows/test_smbfs.py
cinder/volume/drivers/smbfs.py
cinder/volume/drivers/windows/smbfs.py