qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v6 04/15] iotests: Move _filter_nbd into common.filter
Date: Mon, 9 Nov 2015 19:20:32 +0100	[thread overview]
Message-ID: <5640E3F0.10201@redhat.com> (raw)
In-Reply-To: <5640E344.4050406@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3349 bytes --]

On 09.11.2015 19:17, Max Reitz wrote:
> On 09.11.2015 17:04, Kevin Wolf wrote:
>> Am 04.11.2015 um 19:57 hat Max Reitz geschrieben:
>>> _filter_nbd can be useful for other NBD tests, too, therefore it should
>>> reside in common.filter, and it should support URLs of the "nbd://"
>>> format and export names.
>>>
>>> The NBD log lines ("/your/source/dir/nbd.c:function():line: error")
>>> should not be converted to empty lines but removed altogether.
>>>
>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>>
>> Code motion and modification in the same patch is bad style. The changes
>> look good, though.
> 
> Considering splitting this into two patches will result basically in
> both of them each changing just as much as this single patch does
> (because test 083 uses tabs instead of spaces) I'm inclined to just
> change the commit title to "Remove filter_nbd and add _filter_nbd" instead.
> 
> There actually is no good style for this patch. One could argue that the
> coding style in all of test 083 is broken since it uses tabs instead of
> spaces, so first I'd need to fix up the style of 083 completely. Then,
> in a second patch, I can drop those empty lines, and in a third patch I
> can move the function. I consider that horrible when it's just about
> getting the code to common.filter.
> 
> The second variant would be not to move the code, but to "move" it, i.e.
> leave the coding style in 083 and just convert the style of this
> function when moving it to common.filter. Well, if I'm already doing
> that, I might just as well fix that empty line thing on the way.
> 
> The third variant would be to fix that empty line thing in 083, and fix
> the code style of that single function along with it, and then move it
> to common.filter in a separate patch.
> 
> And then we have the fourth way which would be to move nbd_filter to
> common.filter as it is, and then fix up the coding style there.
> 
> So let's look at my opinion for each of them:
> (1) I find it horrible, but I can do that.
> (2) That's what I did and that's what I'd do again.
> (3) I'm opposed to change the style of that one function inside of 083
>     without changing the rest of the file, but not strongly enough not
>     to do it.
> (4) I will definitely not insert tabs, even if it's just code movement.
> 
> I still consider 2 very reasonable for the issue at hand since the
> function is very small and it will have to be completely “rewritten”
> anyway in some patch (because the tabs to spaces change is absolutely
> necessary at some point when moving it from 083 to common.filter).
> Therefore, I don't think reviewers gain anything from doing it any other
> way.
> 
> I consider 1 (fixing up all of 083 just so that I can move this little
> function) so horrible that I won't do it unless there is another way,
> and 2 already is another way, so that's that.
> 
> I guess I'll go for 3 just so you can see why I chose 2 before. I can do
> 1 in v8 if you insist, so you can get to experience that, too.

Oh, even better, I'll go for a mix of 1, 3 and 4: I'll first fix the
code style of that function alone, then I'll rename it to _filter_nbd,
then I'll move it, and then I'll fix it. Even more patches than 1, but
not as many changes, as I don't have to fix all of 083.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-11-09 18:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 18:57 [Qemu-devel] [PATCH v6 for-2.6 00/15] block: Rework bdrv_close_all() Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 01/15] blockdev: Add missing bdrv_unref() in drive-backup Max Reitz
2015-11-09 13:21   ` Alberto Garcia
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 02/15] blockjob: Call bdrv_unref() on creation error Max Reitz
2015-11-09 13:23   ` Alberto Garcia
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 03/15] block: Release dirty bitmaps in bdrv_close() Max Reitz
2015-11-06 18:59   ` [Qemu-devel] [Qemu-block] " John Snow
2015-11-09 16:21     ` Max Reitz
2015-11-09 21:00       ` Max Reitz
2015-11-09 16:04   ` [Qemu-devel] " Kevin Wolf
2015-11-09 16:47     ` Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 04/15] iotests: Move _filter_nbd into common.filter Max Reitz
2015-11-09 16:04   ` Kevin Wolf
2015-11-09 18:17     ` Max Reitz
2015-11-09 18:20       ` Max Reitz [this message]
2015-11-10 10:25       ` Kevin Wolf
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 05/15] iotests: Make redirecting qemu's stderr optional Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 06/15] iotests: Add test for eject under NBD server Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 07/15] block: Move BDS close notifiers into BB Max Reitz
2015-11-09 16:04   ` Kevin Wolf
2015-11-09 16:50     ` Max Reitz
2015-11-09 16:59       ` Kevin Wolf
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 08/15] block: Use blk_remove_bs() in blk_delete() Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 09/15] blockdev: Use blk_remove_bs() in do_drive_del() Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 10/15] block: Make bdrv_close() static Max Reitz
2015-11-09 13:25   ` Alberto Garcia
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 11/15] block: Add list of all BlockDriverStates Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 12/15] blockdev: Keep track of monitor-owned BDS Max Reitz
2015-11-09 15:05   ` Alberto Garcia
2015-11-09 16:26     ` Kevin Wolf
2015-11-09 16:38       ` Alberto Garcia
2015-11-09 16:28     ` Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 13/15] block: Add blk_remove_all_bs() Max Reitz
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 14/15] block: Rewrite bdrv_close_all() Max Reitz
2015-11-05 17:15   ` Paolo Bonzini
2015-11-05 17:37     ` Max Reitz
2015-11-05 17:40       ` Paolo Bonzini
2015-11-05 17:44         ` Eric Blake
2015-11-05 17:54           ` Paolo Bonzini
2015-11-04 18:57 ` [Qemu-devel] [PATCH v6 15/15] iotests: Add test for multiple BB on BDS tree Max Reitz
2015-11-09 16:03 ` [Qemu-devel] [PATCH v6 for-2.6 00/15] block: Rework bdrv_close_all() Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5640E3F0.10201@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).