Linux-XFS Archive on lore.kernel.org
 help / color / 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 11:04:12 -0700
Message-ID: <20191011180412.GE13098@magnolia> (raw)
In-Reply-To: <20191011163127.GA22122@quack2.suse.cz>

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

--D

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

  reply index

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 " 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 [this message]
2019-10-11 21:13         ` Darrick J. Wong
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 publically 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=20191011180412.GE13098@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

Linux-XFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-xfs/0 linux-xfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-xfs linux-xfs/ https://lore.kernel.org/linux-xfs \
		linux-xfs@vger.kernel.org linux-xfs@archiver.kernel.org
	public-inbox-index linux-xfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-xfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox