Re: [PATCH 1/2] iomap: Allow forcing of waiting for running DIO in iomap_dio_rw()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

...

> > @@ -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?

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux