[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage m
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage migration |
Date: |
Fri, 30 Sep 2016 20:09:59 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
---
tests/ahci-test.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 9c0adce..838ff45 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -1132,10 +1132,14 @@ static void test_migrate_sanity(void)
char *uri = g_strdup_printf("unix:%s", mig_socket);
src = ahci_boot("-m 1024 -M q35 "
- "-drive if=ide,file=%s,format=%s ", tmp_path, imgfmt);
+ "-drive if=none,id=drive0,file=%s,format=%s "
+ "-device ide-hd,drive=drive0,lock-mode=shared ",
+ tmp_path, imgfmt);
dst = ahci_boot("-m 1024 -M q35 "
- "-drive if=ide,file=%s,format=%s "
- "-incoming %s", tmp_path, imgfmt, uri);
+ "-drive if=none,id=drive0,file=%s,format=%s "
+ "-device ide-hd,drive=drive0,lock-mode=shared "
+ "-incoming %s",
+ tmp_path, imgfmt, uri);
ahci_migrate(src, dst, uri);
@@ -1157,11 +1161,14 @@ static void ahci_migrate_simple(uint8_t cmd_read,
uint8_t cmd_write)
char *uri = g_strdup_printf("unix:%s", mig_socket);
src = ahci_boot_and_enable("-m 1024 -M q35 "
- "-drive if=ide,format=%s,file=%s ",
+ "-drive if=none,format=%s,file=%s,id=drive0 "
+ "-device ide-hd,drive=drive0,lock-mode=shared ",
imgfmt, tmp_path);
dst = ahci_boot("-m 1024 -M q35 "
- "-drive if=ide,format=%s,file=%s "
- "-incoming %s", imgfmt, tmp_path, uri);
+ "-drive if=none,format=%s,file=%s,id=drive0 "
+ "-device ide-hd,drive=drive0,lock-mode=shared "
+ "-incoming %s",
+ imgfmt, tmp_path, uri);
set_context(src->parent);
@@ -1286,7 +1293,7 @@ static void ahci_migrate_halted_io(uint8_t cmd_read,
uint8_t cmd_write)
"format=%s,cache=writeback,"
"rerror=stop,werror=stop "
"-M q35 "
- "-device ide-hd,drive=drive0 ",
+ "-device ide-hd,drive=drive0,lock-mode=shared ",
debug_path,
tmp_path, imgfmt);
@@ -1294,7 +1301,7 @@ static void ahci_migrate_halted_io(uint8_t cmd_read,
uint8_t cmd_write)
"format=%s,cache=writeback,"
"rerror=stop,werror=stop "
"-M q35 "
- "-device ide-hd,drive=drive0 "
+ "-device ide-hd,drive=drive0,lock-mode=shared "
"-incoming %s",
tmp_path, imgfmt, uri);
@@ -1358,13 +1365,13 @@ static void test_flush_migrate(void)
"cache=writeback,rerror=stop,werror=stop,"
"format=%s "
"-M q35 "
- "-device ide-hd,drive=drive0 ",
+ "-device ide-hd,drive=drive0,lock-mode=shared ",
debug_path, tmp_path, imgfmt);
dst = ahci_boot("-drive file=%s,if=none,id=drive0,"
"cache=writeback,rerror=stop,werror=stop,"
"format=%s "
"-M q35 "
- "-device ide-hd,drive=drive0 "
+ "-device ide-hd,drive=drive0,lock-mode=shared "
"-incoming %s", tmp_path, imgfmt, uri);
set_context(src->parent);
--
2.7.4
- [Qemu-devel] [PATCH v8 19/36] pflash: Add "lock-mode" property, (continued)
- [Qemu-devel] [PATCH v8 19/36] pflash: Add "lock-mode" property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection out from verify_io, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 22/36] qemu-iotests: 030: Disable image locking when checking test image, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 23/36] iotests: 087: Disable image locking in cases where file is shared, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 24/36] iotests: 087: Disable image locking in cases where file is shared, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 25/36] iotests: 130: Check image info locklessly, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 26/36] iotests: Disable image locking in 085, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 27/36] tests: Use null-co:// instead of /dev/null, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 28/36] qemu-iotests: Add test case 153 for image locking, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage migration,
Fam Zheng <=
- [Qemu-devel] [PATCH v8 30/36] tests/postcopy: Use shared lock for images, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 31/36] fdc: Add lock-mode qdev properties, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 32/36] m25p80: Add 'lock-mode' property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 33/36] nand: Add 'lock-mode' property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 34/36] onenand: Add 'lock-mode' property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 35/36] spapr_nvram: Add 'lock-mode' property, Fam Zheng, 2016/09/30
- [Qemu-devel] [PATCH v8 36/36] sd: Add 'lock-mode' property, Fam Zheng, 2016/09/30