All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/4] Rename DriveInfo.onerror to on_write_error
Date: Fri, 04 Dec 2009 09:18:58 +0100	[thread overview]
Message-ID: <4B18C5F2.50100@redhat.com> (raw)
In-Reply-To: <4B1817C7.3000804@codemonkey.ws>

Am 03.12.2009 20:55, schrieb Anthony Liguori:
> Gleb Natapov wrote:
>> On Fri, Nov 27, 2009 at 01:25:36PM +0100, Kevin Wolf wrote:
>>   
>>> Either rename variables and functions to refer to write errors (which is what
>>> they actually do) or introduce a parameter to distinguish reads and writes.
>>>
>>>     
>> I prefer either to use two different functions or hide 0/1 parameter behind
>> a macro:
>>  #define drive_get_on_write_error(a) drive_get_on_error(a, 0);
>>   
> 
> Or a static inline.  But honestly, having three globally scoped 
> functions shouldn't be a problem.

Well, in the end, the callers already have some kind of is_read and just
pass it on. Would we really gain anything if they needed to put a
five-line if block there instead of a one-line function call (or maybe
two lines if they need to extract the is_read flag from somewhere)?

So, I'm happy to add your static inline functions, but I wouldn't like
to use them...

Kevin

  reply	other threads:[~2009-12-04  8:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 12:25 [Qemu-devel] [PATCH 0/4] rerror option for -drive Kevin Wolf
2009-11-27 12:25 ` [Qemu-devel] [PATCH 1/4] Rename DriveInfo.onerror to on_write_error Kevin Wolf
2009-11-29 10:46   ` Gleb Natapov
2009-12-03 19:55     ` Anthony Liguori
2009-12-04  8:18       ` Kevin Wolf [this message]
2009-11-27 12:25 ` [Qemu-devel] [PATCH 2/4] Introduce rerror option for drives Kevin Wolf
2009-11-27 12:25 ` [Qemu-devel] [PATCH 3/4] ide: Implement rerror option Kevin Wolf
2009-11-27 12:25 ` [Qemu-devel] [PATCH 4/4] virtio-blk: " 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=4B18C5F2.50100@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=gleb@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.