Re: [dm-devel] [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-20 Thread Bart Van Assche
On Thu, 2017-04-20 at 16:02 +0200, Christoph Hellwig wrote: > The function only returns -EIO if rq->errors is non-zero, which is not > very useful and lets a large number of callers ignore the return value. > > Just let the callers figure out their error themselves. Reviewed-by: Bart Van Assche

[dm-devel] [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-20 Thread Christoph Hellwig
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

Re: [dm-devel] [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-19 Thread h...@lst.de
On Wed, Apr 19, 2017 at 09:07:45PM +, Bart Van Assche wrote: > > + blk_execute_rq(or->request->q, NULL, or->request, 0); > > + error = or->request ? -EIO : 0; > > Hello Christoph, > > Did you perhaps intend or->request->errors instead of or->request? Yes, thanks. -- dm-devel mailing

Re: [dm-devel] [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote: > --- a/drivers/scsi/osd/osd_initiator.c > +++ b/drivers/scsi/osd/osd_initiator.c > @@ -489,7 +489,10 @@ static void _set_error_resid(struct osd_request *or, > struct request *req, > > int osd_execute_request(struct osd_request *or) >

[dm-devel] [PATCH 02/23] block: remove the blk_execute_rq return value

2017-04-19 Thread Christoph Hellwig
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn