Re: [PATCH 1/3] direct-io: always call ->end_io if non-NULL

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

 



> > -	if (dio->end_io && dio->result)
> > -		dio->end_io(dio->iocb, offset, transferred, dio->private);
> > +	if (dio->end_io)
> > +		dio->end_io(dio->iocb, offset, ret, dio->private);
> 
> Could we make end_io return an int so that errors during completion can be
> stuffed into ret to be picked up by whatever's calling directio?  Something
> like this:
> 
> if (dio->end_io) {
> 	int ret2;
> 
> 	ret2 = dio->end_io(dio->iocb, offset, ret, dio->private);
> 	if (ret2 && !ret)
> 		ret = ret2;
> }
> 
> That way I can capture IO errors during the CoW remapping step and pass them to
> userland either via dio_complete()'s return value or through ki_complete.
> 
> (If ret itself is an error code then obviously we don't bother with the
> post-CoW remap.)

Should be doable, I'll respin it with that change.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux