public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Gabriel Krisman Bertazi <[email protected]>,
	Lu Hongfei <[email protected]>
Cc: Pavel Begunkov <[email protected]>,
	[email protected], [email protected],
	[email protected]
Subject: Re: [PATCH] io_uring: Redefined the meaning of io_alloc_async_data's return value
Date: Mon, 10 Jul 2023 11:02:21 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 7/10/23 10:58?AM, Gabriel Krisman Bertazi wrote:
> Lu Hongfei <[email protected]> writes:
> 
>> Usually, successful memory allocation returns true and failure returns false,
>> which is more in line with the intuitive perception of most people. So it
>> is necessary to redefine the meaning of io_alloc_async_data's return value.
>>
>> This could enhance the readability of the code and reduce the possibility
>> of confusion.
> 
> just want to say, this is the kind of patch that causes bugs in
> downstream kernels.  It is not fixing anything, and when we backport a
> future bugfix around it, it is easy to miss it and slightly break the
> semantics.

Exactly! This is also why I'm not a fan of patches like this, and was
not intending to apply it.

> That's my downstream problem, of course. But at least it would be good

Strictly speaking it is, but I think we have a responsibility to not
have core bits be different upstream "just because". IOW, making it
harder to introduce problems when backporting.

And fwiw, I'm not sure I agree on the idiomatic part of it. Lots of
functions return 0 for success and non-zero for an error. It's a bit odd
as this one is a bool, but I'm pretty sure it used to return an actual
error and this is why it looks the way it currently does.

-- 
Jens Axboe


  reply	other threads:[~2023-07-10 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  9:09 [PATCH] io_uring: Redefined the meaning of io_alloc_async_data's return value Lu Hongfei
2023-07-10 16:58 ` Gabriel Krisman Bertazi
2023-07-10 17:02   ` Jens Axboe [this message]
2023-07-11  5:06   ` Christoph Hellwig

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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