|
From: | Max Reitz |
Subject: | Re: [Qemu-block] [Qemu-devel] [PATCH] use bdrv_flush to provide barrier semantic in block/vdi.c for metadata updates |
Date: | Wed, 06 May 2015 19:36:42 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
CC-ing qemu-block and Stefan Weil
(maintainer of vdi).
On 06.05.2015 19:23, phoeagon wrote:
One of both is enough. Both are too much. :-) It is indeed correct, technically (because ret is 0 before the bdrv_write()), but it's too verbose. (See below)
It doesn't really matter, I think. Returning any non-negative value from vdi_co_write() should be enough to signal success.
I think bdrv_write() always returns 0 on success. In any case, it's fine for vdi_co_write() to return 0 on success (which is what bdrv_flush() returns), so shorting these four lines to "ret = bdrv_flush(bs->file);" is enough. The patch is correct, though, so if you want to leave it as it is, all you need to do is bring it into proper form (http://wiki.qemu.org/Contribute/SubmitAPatch). The previous version was nearly right, except for the things I mentioned: The subject needs to start with the part of qemu the patch is targeting (in this case "block/vdi: " or simply "vdi: "), the Signed-off-by needs to contain your name (or any alias you desire) and your email address, and comments for the patch should be separated from the actual commit message by "---". Finally, for sending the next version, please change the "[PATCH]" in the subject to "[PATCH v3]" in order to indicate that it will be version 3 of this patch. Thanks! Max
|
[Prev in Thread] | Current Thread | [Next in Thread] |