Skip to contentSkip to conversation

Block layer patches for 4.0-rc4

GIT PULL Applied Kevin Wolf 2 participants 4 messages Apr 12, 2019 – Apr 14, 2019

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

The following changes since commit 13c24edaa742181af8d9c6b027ee366b04de1ea1:

qemu-img: fix .hx and .texi disparity (2019-04-12 14:17:10 +0100)

are available in the Git repository at:

git://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to 9749636b005d118259810afb92482df2fe0ae2ad:

iotest: Fix 241 to run in generic directory (2019-04-12 18:03:01 +0200)

----------------------------------------------------------------
Block layer patches:

- iotests fixes

----------------------------------------------------------------
Eric Blake (1):
iotest: Fix 241 to run in generic directory

Max Reitz (1):
iotests: Let 245 pass on tmpfs

 tests/qemu-iotests/241     |  4 +++-
 tests/qemu-iotests/241.out |  6 +++---
 tests/qemu-iotests/245     | 10 ++++++++--
 3 files changed, 14 insertions(+), 6 deletions(-)
author
#1 lore raw

[Qemu-devel] [PULL 1/2] iotests: Let 245 pass on tmpfs

From: Max Reitz <[email protected]>

tmpfs does not support O_DIRECT. Detect this case, and skip flipping @direct if the filesystem does not support it.

Fixes bf3e50f6239090e63a8ffaaec971671e66d88e07
---
 tests/qemu-iotests/245 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/qemu-iotests/245 +8 -2
index 7891a210c1..a04c6235c1 100644
@@ -209,6 +209,12 @@ class TestBlockdevReopen(iotests.QMPTestCase):
 
     # Reopen an image several times changing some of its options
     def test_reopen(self):
+        # Check whether the filesystem supports O_DIRECT
+        if 'O_DIRECT' in qemu_io('-f', 'raw', '-t', 'none', '-c', 'quit', hd_path[0]):
+            supports_direct = False
+        else:
+            supports_direct = True
+
         # Open the hd1 image passing all backing options
         opts = hd_opts(1)
         opts['backing'] = hd_opts(0)
@@ -231,9 +237,9 @@ class TestBlockdevReopen(iotests.QMPTestCase):
         self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True)
         self.assert_qmp(self.get_node('hd1'), 'cache/direct', False)
         self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', False)
-        self.reopen(opts, {'cache': { 'direct': True, 'no-flush': True }})
+        self.reopen(opts, {'cache': { 'direct': supports_direct, 'no-flush': True }})
         self.assert_qmp(self.get_node('hd1'), 'cache/writeback', True)
-        self.assert_qmp(self.get_node('hd1'), 'cache/direct', True)
+        self.assert_qmp(self.get_node('hd1'), 'cache/direct', supports_direct)
         self.assert_qmp(self.get_node('hd1'), 'cache/no-flush', True)
 
         # Reopen again with the original options
Signature · 1 line
2.20.1
author
#2 lore raw

[Qemu-devel] [PULL 2/2] iotest: Fix 241 to run in generic directory

In reply to Kevin Wolf

From: Eric Blake <[email protected]>

Filter the qemu-nbd server output to get rid of a direct reference to my build directory.

---
 tests/qemu-iotests/241     | 4 +++-
 tests/qemu-iotests/241.out | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)
tests/qemu-iotests/241 +3 -1
index 4b19685738..017a736aab 100755
@@ -28,6 +28,7 @@ nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket
 _cleanup()
 {
     _cleanup_test_img
+    rm -f "$TEST_DIR/server.log"
     nbd_server_stop
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -69,12 +70,13 @@ echo
 
 # Intentionally omit '-f' to force image probing, which in turn forces
 # sector alignment, here at the server.
-nbd_server_start_unix_socket "$TEST_IMG_FILE"
+nbd_server_start_unix_socket "$TEST_IMG_FILE" 2> "$TEST_DIR/server.log"
 
 $QEMU_NBD_PROG --list -k $nbd_unix_socket | grep '\(size\|min\)'
 $QEMU_IMG map -f raw --output=json "$TEST_IMG" | _filter_qemu_img_map
 $QEMU_IO -f raw -c map "$TEST_IMG"
 nbd_server_stop
+cat "$TEST_DIR/server.log" | _filter_testdir
 
 echo
 echo "=== Exporting unaligned raw image, forced client sector alignment ==="
tests/qemu-iotests/241.out +3 -3
index f481074a02..75f9f465e5 100644
@@ -10,13 +10,13 @@ QA output created by 241
 
 === Exporting unaligned raw image, forced server sector alignment ===
 
-WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-iotests/scratch/t.raw' and probing guessed raw.
-         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
-         Specify the 'raw' format explicitly to remove the restrictions.
   size:  1024
   min block: 512
 [{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
 1 KiB (0x400) bytes     allocated at offset 0 bytes (0x0)
+WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
+         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
+         Specify the 'raw' format explicitly to remove the restrictions.
 
 === Exporting unaligned raw image, forced client sector alignment ===
 
Signature · 1 line
2.20.1
#3 lore raw
In reply to Kevin Wolf
Quoted 9 lines · Kevin Wolf

The following changes since commit 13c24edaa742181af8d9c6b027ee366b04de1ea1:

qemu-img: fix .hx and .texi disparity (2019-04-12 14:17:10 +0100)

are available in the Git repository at:

git://repo.or.cz/qemu/kevin.git tags/for-upstream

Quoted 8 lines

for you to fetch changes up to 9749636b005d118259810afb92482df2fe0ae2ad:

iotest: Fix 241 to run in generic directory (2019-04-12 18:03:01 +0200)

----------------------------------------------------------------
Block layer patches:

- iotests fixes

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM