linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>, Michal Kubecek <mkubecek@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] eventfd: convert to ->write_iter()
Date: Thu, 19 Nov 2020 11:48:04 -0700	[thread overview]
Message-ID: <ffb060aa-e3ed-3dbe-9418-8ccf8d798974@kernel.dk> (raw)
In-Reply-To: <20201119180315.GB24054@infradead.org>

On 11/19/20 11:03 AM, Christoph Hellwig wrote:
> On Thu, Nov 19, 2020 at 07:00:19PM +0100, Michal Kubecek wrote:
>> While eventfd ->read() callback was replaced by ->read_iter() recently by
>> commit 12aceb89b0bc ("eventfd: convert to f_op->read_iter()"), ->write()
>> was not replaced.
>>
>> Convert also ->write() to ->write_iter() to make the interface more
>> consistent and allow non-blocking writes from e.g. io_uring. Also
>> reorganize the code and return value handling in a similar way as it was
>> done in eventfd_read().
> 
> But this patch does not allow non-blocking writes.

What am I missing here? He checks the file and IOCB non-block flags,
and returns -EAGAIN if there's no space. If not, it waits and schedules.

-- 
Jens Axboe


      parent reply	other threads:[~2020-11-19 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 18:00 [PATCH v2] eventfd: convert to ->write_iter() Michal Kubecek
2020-11-19 18:03 ` Christoph Hellwig
2020-11-19 18:46   ` Michal Kubecek
2020-11-21 17:07     ` Michal Kubecek
2020-11-19 18:48   ` Jens Axboe [this message]

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=ffb060aa-e3ed-3dbe-9418-8ccf8d798974@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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).