Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Avi Kivity <avi@scylladb.com>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>,
	linux-fsdevel@vger.kernel.org, linux-aio@kvack.org
Subject: Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT
Date: Fri, 31 Jul 2020 14:11:11 +0100	[thread overview]
Message-ID: <20200731131111.GA18024@infradead.org> (raw)
In-Reply-To: <833af9cb-7c94-9e69-65cb-abd3cee5af65@scylladb.com>

On Wed, Jul 22, 2020 at 07:08:21PM +0300, Avi Kivity wrote:
> 
> On 13/12/2018 13.53, Goldwyn Rodrigues wrote:
> > For AIO+DIO with RWF_NOWAIT, if the block layer does not support REQ_NOWAIT,
> > it returns EIO. Return EOPNOTSUPP to represent the correct error code.
> > 
> > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

I think the main problem is the EOPNOTSUPP return value.  Everywhere
else we treat the lack of support as BLK_STS_AGAIN / -EAGAIN, so it
should return that.  Independ of that the legacy direct I/O code
really should just use blk_status_to_errno like most of the other
infrastructure instead of havings it's own conversion and dropping
the detailed error status on the floor.

      parent reply	other threads:[~2020-07-31 13:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 11:53 Goldwyn Rodrigues
2018-12-13 12:04 ` Avi Kivity
2018-12-13 14:24   ` Christoph Hellwig
2018-12-13 15:44     ` Goldwyn Rodrigues
2018-12-16 10:45     ` Avi Kivity
2018-12-17 17:38       ` Christoph Hellwig
2018-12-18 11:55         ` Goldwyn Rodrigues
2018-12-20 15:32           ` Avi Kivity
2018-12-13 16:27 ` Matthew Wilcox
2018-12-13 19:04   ` Goldwyn Rodrigues
2018-12-13 22:43 ` Dave Chinner
2018-12-14 17:09   ` Goldwyn Rodrigues
2018-12-16 21:35     ` Dave Chinner
2018-12-18 11:53       ` Goldwyn Rodrigues
2020-07-22 16:08 ` Avi Kivity
2020-07-28 13:38   ` Goldwyn Rodrigues
2020-07-28 13:47     ` Avi Kivity
2020-07-31 13:11   ` Christoph Hellwig [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=20200731131111.GA18024@infradead.org \
    --to=hch@infradead.org \
    --cc=avi@scylladb.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rgoldwyn@suse.de \
    --subject='Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT' \
    /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

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).