diff options
author | Zuul <zuul@review.openstack.org> | 2019-04-06 09:55:32 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-04-06 09:55:33 +0000 |
commit | beea50afe41567c2f31bac5db1eefd017621469d (patch) | |
tree | 78515b5048f823b9072e31f5a53fed1bf46d3f22 | |
parent | 5c5a6b93a07b0b58f513396254049c17e2883894 (diff) | |
parent | c77c3eb61ca7a0da64eed62dea084ee3df1d0722 (diff) | |
download | nova-beea50afe41567c2f31bac5db1eefd017621469d.tar.gz |
Merge "Make supports_direct_io work on 4096b sector size" into stable/ocata
-rw-r--r-- | nova/virt/libvirt/driver.py | 4 | ||||
-rw-r--r-- | releasenotes/notes/bug-1801702-c8203d3d55007deb.yaml | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index b0e4395b2d..69eaebc185 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -2972,8 +2972,8 @@ class LibvirtDriver(driver.ComputeDriver): fd = None try: fd = os.open(testfile, os.O_CREAT | os.O_WRONLY | os.O_DIRECT) - # Check is the write allowed with 512 byte alignment - align_size = 512 + # Check is the write allowed with 4096 byte alignment + align_size = 4096 m = mmap.mmap(-1, align_size) m.write(b"x" * align_size) os.write(fd, m) diff --git a/releasenotes/notes/bug-1801702-c8203d3d55007deb.yaml b/releasenotes/notes/bug-1801702-c8203d3d55007deb.yaml new file mode 100644 index 0000000000..67fa573c49 --- /dev/null +++ b/releasenotes/notes/bug-1801702-c8203d3d55007deb.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + When testing whether direct IO is possible on the backing storage + for an instance, Nova now uses a block size of 4096 bytes instead + of 512 bytes, avoiding issues when the underlying block device has + sectors larger than 512 bytes. See bug + https://launchpad.net/bugs/1801702 for details. |