Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT

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

 



On  6:24 13/12, Christoph Hellwig wrote:
> On Thu, Dec 13, 2018 at 02:04:41PM +0200, Avi Kivity wrote:
> > On 12/13/18 1:53 PM, 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.
> > 
> > 
> > Cc: stable@?
> > 
> > 
> > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx>
> > > ---
> > >   fs/direct-io.c | 11 +++++++----
> > >   1 file changed, 7 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/fs/direct-io.c b/fs/direct-io.c
> > > index 41a0e97252ae..77adf33916b8 100644
> > > --- a/fs/direct-io.c
> > > +++ b/fs/direct-io.c
> > > @@ -542,10 +542,13 @@ static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio)
> > >   	blk_status_t err = bio->bi_status;
> > >   	if (err) {
> 
> I think this just need to become:
> 
> 	if (err)
> 		dio->io_error = blk_status_to_errno(bio->bi_status);
> 

Ahh.. Din't of it's existence. Yes, the function is much more elaborate.

Thanks!

-- 
Goldwyn



[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