Re: [PATCH] block: add a bi_error field to struct bio

2015-07-28 Thread Jens Axboe
On 07/28/2015 05:12 AM, Christoph Hellwig wrote: On Fri, Jul 24, 2015 at 10:36:45AM -0600, Jens Axboe wrote: Right, I don't think we need to do that though. If you look at the flags usage, it's all over the map. Some use test/set_bit, some set it just by OR'ing the mask. There's no reason we

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-28 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 10:36:45AM -0600, Jens Axboe wrote: > Right, I don't think we need to do that though. If you look at the flags > usage, it's all over the map. Some use test/set_bit, some set it just by > OR'ing the mask. There's no reason we can't make this work without relying > on

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-28 Thread Jens Axboe
On 07/28/2015 05:12 AM, Christoph Hellwig wrote: On Fri, Jul 24, 2015 at 10:36:45AM -0600, Jens Axboe wrote: Right, I don't think we need to do that though. If you look at the flags usage, it's all over the map. Some use test/set_bit, some set it just by OR'ing the mask. There's no reason we

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-28 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 10:36:45AM -0600, Jens Axboe wrote: Right, I don't think we need to do that though. If you look at the flags usage, it's all over the map. Some use test/set_bit, some set it just by OR'ing the mask. There's no reason we can't make this work without relying on

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Jens Axboe
On 07/24/2015 04:49 AM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: One possible solution would be to shrink bi_flags to an unsigned int, no problems fitting that in. Then we could stuff bi_error in that (new) hole, and we would end up having the same

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: > One possible solution would be to shrink bi_flags to an unsigned int, no > problems fitting that in. Then we could stuff bi_error in that (new) hole, > and we would end up having the same size again. As long as we use

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: One possible solution would be to shrink bi_flags to an unsigned int, no problems fitting that in. Then we could stuff bi_error in that (new) hole, and we would end up having the same size again. As long as we use set/test/clear_bt

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-24 Thread Jens Axboe
On 07/24/2015 04:49 AM, Christoph Hellwig wrote: On Wed, Jul 22, 2015 at 03:59:46PM -0600, Jens Axboe wrote: One possible solution would be to shrink bi_flags to an unsigned int, no problems fitting that in. Then we could stuff bi_error in that (new) hole, and we would end up having the same

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-22 Thread Jens Axboe
On 07/22/2015 12:51 PM, Jens Axboe wrote: On 07/20/2015 07:29 AM, Christoph Hellwig wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-22 Thread Jens Axboe
On 07/20/2015 07:29 AM, Christoph Hellwig wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only communicating a single possible

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-22 Thread Jens Axboe
On 07/20/2015 07:29 AM, Christoph Hellwig wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only communicating a single possible

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-22 Thread Jens Axboe
On 07/22/2015 12:51 PM, Jens Axboe wrote: On 07/20/2015 07:29 AM, Christoph Hellwig wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-21 Thread NeilBrown
On Mon, 20 Jul 2015 15:29:37 +0200 Christoph Hellwig wrote: > Currently we have two different ways to signal an I/O error on a BIO: > > (1) by clearing the BIO_UPTODATE flag > (2) by returning a Linux errno value to the bi_end_io callback > > The first one has the drawback of only

Re: [dm-devel] [PATCH] block: add a bi_error field to struct bio

2015-07-21 Thread Hannes Reinecke
On 07/20/2015 03:29 PM, Christoph Hellwig wrote: > Currently we have two different ways to signal an I/O error on a BIO: > > (1) by clearing the BIO_UPTODATE flag > (2) by returning a Linux errno value to the bi_end_io callback > > The first one has the drawback of only communicating a single

Re: [PATCH] block: add a bi_error field to struct bio

2015-07-21 Thread NeilBrown
On Mon, 20 Jul 2015 15:29:37 +0200 Christoph Hellwig h...@lst.de wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only

Re: [dm-devel] [PATCH] block: add a bi_error field to struct bio

2015-07-21 Thread Hannes Reinecke
On 07/20/2015 03:29 PM, Christoph Hellwig wrote: Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only communicating a single

[PATCH] block: add a bi_error field to struct bio

2015-06-11 Thread Christoph Hellwig
Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only communicating a single possible error (-EIO), and the second one has the drawback of

[PATCH] block: add a bi_error field to struct bio

2015-06-11 Thread Christoph Hellwig
Currently we have two different ways to signal an I/O error on a BIO: (1) by clearing the BIO_UPTODATE flag (2) by returning a Linux errno value to the bi_end_io callback The first one has the drawback of only communicating a single possible error (-EIO), and the second one has the drawback of