Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Dave Chinner <>
To: Goldwyn Rodrigues <>
Subject: Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT
Date: Fri, 14 Dec 2018 09:43:27 +1100	[thread overview]
Message-ID: <20181213224327.GE29416@dastard> (raw)
In-Reply-To: <20181213115306.fm2mjc3qszjiwkgf@merlin>

On Thu, Dec 13, 2018 at 05:53:06AM -0600, 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.

Say what?

Does this mean that if a filesystem supports RWF_NOWAIT, but the
underlying block device/storage stack doesn't support it, then we'll
getting EIO/EOPNOTSUPP errors returned to userspace?

Isn't that highly unfriendly to userspace applications? i.e. instead
of just ignoring RWF_NOWAIT in this case and having the AIO succeed,
we return a /fatal/ error from deep in the guts of the IO subsystem
that the user has no obvious way of tracking down?

I'm also concerned that this is highly hardware dependent - two
identical filesystems on different storage hardware on the same
machine could behave differently. i.e. it works on one filesystem
but not on the other, and there's no way to tell when it will work
or fail apart from trying to use RWF_NOWAIT?

I'd also like to point out that this errori (whether EIO or
EOPNOTSUPP) is completely undocumented in the preadv2/pwritev2 man
page, so application developers that get bug reports about
EOPNOTSUPP errors are going to be rather confused....


Dave Chinner

  parent reply	other threads:[~2018-12-13 22:43 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 [this message]
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

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:

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

  git send-email \
    --in-reply-to=20181213224327.GE29416@dastard \ \ \ \ \ \
    --subject='Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT' \

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