linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, Dave Chinner <david@fromorbit.com>,
	Matthew Bobrowski <mbobrowski@mbobrowski.org>
Subject: Re: [PATCH 1/2] iomap: Allow forcing of waiting for running DIO in iomap_dio_rw()
Date: Fri, 11 Oct 2019 14:13:26 -0700	[thread overview]
Message-ID: <20191011211326.GL13108@magnolia> (raw)
In-Reply-To: <20191011180412.GE13098@magnolia>

On Fri, Oct 11, 2019 at 11:04:12AM -0700, Darrick J. Wong wrote:
> On Fri, Oct 11, 2019 at 06:31:27PM +0200, Jan Kara wrote:
> > On Fri 11-10-19 08:28:21, Darrick J. Wong wrote:
> > > On Fri, Oct 11, 2019 at 04:14:31PM +0200, Jan Kara wrote:
> > > > Filesystems do not support doing IO as asynchronous in some cases. For
> > > > example in case of unaligned writes or in case file size needs to be
> > > > extended (e.g. for ext4). Instead of forcing filesystem to wait for AIO
> > > > in such cases, add argument to iomap_dio_rw() which makes the function
> > > > wait for IO completion. This also results in executing
> > > > iomap_dio_complete() inline in iomap_dio_rw() providing its return value
> > > > to the caller as for ordinary sync IO.
> > > > 
> > > > Signed-off-by: Jan Kara <jack@suse.cz>
> > 
> > ...
> > 
> > > > @@ -409,6 +409,9 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
> > > >  	if (!count)
> > > >  		return 0;
> > > >  
> > > > +	if (WARN_ON(is_sync_kiocb(iocb) && !wait_for_completion))
> > > > +		return -EINVAL;
> > > 
> > > So far in iomap we've been returning EIO when someone internal screws
> > > up, which (AFAICT) is the case here.
> > 
> > Yes. Should I resend with -EIO or will you tweak that on commit?
> 
> Yes, please. :)

"Yes, resend the patch with -EIO, please." :/

--D

> 
> --D
> 
> > 								Honza
> > -- 
> > Jan Kara <jack@suse.com>
> > SUSE Labs, CR

  reply	other threads:[~2019-10-11 21:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 14:14 [PATCH 0/2 v2] iomap: Waiting for IO in iomap_dio_rw() Jan Kara
2019-10-11 14:14 ` [PATCH 1/2] iomap: Allow forcing of waiting for running DIO " Jan Kara
2019-10-11 15:28   ` Darrick J. Wong
2019-10-11 16:31     ` Jan Kara
2019-10-11 18:04       ` Darrick J. Wong
2019-10-11 21:13         ` Darrick J. Wong [this message]
2019-10-11 14:14 ` [PATCH 2/2] xfs: Use iomap_dio_rw_wait() Jan Kara
2019-10-11 15:28   ` Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2019-10-14  8:26 [PATCH 0/2 v3] iomap: Waiting for IO in iomap_dio_rw() Jan Kara
2019-10-14  8:26 ` [PATCH 1/2] iomap: Allow forcing of waiting for running DIO " Jan Kara
2019-10-14  8:40   ` Christoph Hellwig
2019-10-09 20:41 [PATCH 0/2] iomap: Waiting for IO " Jan Kara
2019-10-09 20:41 ` [PATCH 1/2] iomap: Allow forcing of waiting for running DIO " Jan Kara

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=20191011211326.GL13108@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mbobrowski@mbobrowski.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 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).