[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PULL 64/69] qemu-io: Add 'write -f' to te
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PULL 64/69] qemu-io: Add 'write -f' to test FUA flag |
Date: |
Thu, 12 May 2016 15:23:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 05/12/2016 08:35 AM, Kevin Wolf wrote:
> From: Eric Blake <address@hidden>
>
> Make it easier to test block drivers with BDRV_REQ_FUA in
> .supported_write_flags, by adding the '-f' flag to qemu-io to
> conditionally pass the flag through to specific writes ('write',
> 'write -z', 'writev', 'aio_write', 'aio_write -z'). You'll want
> to use 'qemu-io -t none' to actually make -f useful (as
> otherwise, the default writethrough mode automatically sets the
> FUA bit on every write).
>
> Signed-off-by: Eric Blake <address@hidden>
> Message-id: address@hidden
> Reviewed-by: Max Reitz <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> qemu-io-cmds.c | 57 +++++++++++++++++++++++++++++++++++++++++----------------
> 1 file changed, 41 insertions(+), 16 deletions(-)
>
> @@ -935,6 +938,7 @@ static void write_help(void)
> +" -f, -- use Force Unit Access semantics\n"
> @@ -951,7 +955,7 @@ static const cmdinfo_t write_cmd = {
> - .args = "[-bcCqz] [-P pattern] off len",
> + .args = "[-bcCfqz] [-P pattern] off len",
> @@ -969,7 +974,7 @@ static int write_f(BlockBackend *blk, int argc, char
> **argv)
> - while ((c = getopt(argc, argv, "bcCpP:qz")) != -1) {
> + while ((c = getopt(argc, argv, "bcCfpP:qz")) != -1) {
> @@ -980,6 +985,9 @@ static int write_f(BlockBackend *blk, int argc, char
> **argv)
> case 'C':
> Cflag = true;
> break;
> + case 'f':
Four places to touch per added option. 'write -f' is okay...
> @@ -1097,6 +1110,7 @@ writev_help(void)
> +" -f, -- use Force Unit Access semantics\n"
> @@ -1108,7 +1122,7 @@ static const cmdinfo_t writev_cmd = {
> - .args = "[-Cq] [-P pattern] off len [len..]",
> + .args = "[-Cfq] [-P pattern] off len [len..]",
> @@ -1131,6 +1146,9 @@ static int writev_f(BlockBackend *blk, int argc, char
> **argv)
> + case 'f':
Whoops - forgot to update getopt() for 'writev -f'. Followup patch
coming shortly. I also botched it in 65/69, for 'aio_write -z -u'.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PULL 46/69] qemu-io: Switch to byte-based block access, (continued)
- [Qemu-block] [PULL 46/69] qemu-io: Switch to byte-based block access, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 68/69] block: enable testing of LUKS driver with block I/O tests, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 50/69] block: Honor BDRV_REQ_FUA during write_zeroes, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 51/69] nbd: Simplify client FUA handling, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 49/69] block: Make supported_write_flags a per-bds property, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 58/69] quorum: implement bdrv_add_child() and bdrv_del_child(), Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 56/69] qemu-img: check block status of backing file when converting., Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 62/69] qemu-io: Use bool for command line flags, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 65/69] qemu-io: Add 'write -z -u' to test MAY_UNMAP flag, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 64/69] qemu-io: Add 'write -f' to test FUA flag, Kevin Wolf, 2016/05/12
- Re: [Qemu-block] [Qemu-devel] [PULL 64/69] qemu-io: Add 'write -f' to test FUA flag,
Eric Blake <=
- [Qemu-block] [PULL 66/69] block: add support for --image-opts in block I/O tests, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 69/69] qemu-iotests: iotests: fail hard if not run via "check", Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 67/69] block: add support for encryption secrets in block I/O tests, Kevin Wolf, 2016/05/12
- [Qemu-block] [PULL 63/69] qemu-io: Allow unaligned access by default, Kevin Wolf, 2016/05/12
- Re: [Qemu-block] [Qemu-devel] [PULL 00/69] Block layer patches, Peter Maydell, 2016/05/12