[PATCH] bsg: bidi bio map failure fix

2008-02-12 Thread Pete Wyckoff
If blk_rq_map_user requires more than one bio, and fails mapping somewhere after the first bio, it will return with rq->bio set to non-NULL, but it will have already unmapped the partial bio. The "out:" error exit section will see the non-null bio and try to unmap it again, triggering a mapcount b

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-12 Thread James Bottomley
On Tue, 2008-02-12 at 15:40 -0500, Pete Wyckoff wrote: > If blk_rq_map_user requires more than one bio, and fails mapping > somewhere after the first bio, it will return with rq->bio set to > non-NULL, but it will have already unmapped the partial bio. The > "out:" error exit section will see the

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-14 Thread FUJITA Tomonori
On Tue, 12 Feb 2008 15:40:24 -0500 Pete Wyckoff <[EMAIL PROTECTED]> wrote: > If blk_rq_map_user requires more than one bio, and fails mapping > somewhere after the first bio, it will return with rq->bio set to > non-NULL, but it will have already unmapped the partial bio. The > "out:" error exit

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread Jens Axboe
On Tue, Feb 12 2008, James Bottomley wrote: > On Tue, 2008-02-12 at 15:40 -0500, Pete Wyckoff wrote: > > If blk_rq_map_user requires more than one bio, and fails mapping > > somewhere after the first bio, it will return with rq->bio set to > > non-NULL, but it will have already unmapped the partial

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread FUJITA Tomonori
On Mon, 18 Feb 2008 13:55:08 +0100 Jens Axboe <[EMAIL PROTECTED]> wrote: > On Tue, Feb 12 2008, James Bottomley wrote: > > On Tue, 2008-02-12 at 15:40 -0500, Pete Wyckoff wrote: > > > If blk_rq_map_user requires more than one bio, and fails mapping > > > somewhere after the first bio, it will retu

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread Jens Axboe
On Mon, Feb 18 2008, FUJITA Tomonori wrote: > On Mon, 18 Feb 2008 13:55:08 +0100 > Jens Axboe <[EMAIL PROTECTED]> wrote: > > > On Tue, Feb 12 2008, James Bottomley wrote: > > > On Tue, 2008-02-12 at 15:40 -0500, Pete Wyckoff wrote: > > > > If blk_rq_map_user requires more than one bio, and fails m

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread James Bottomley
On Mon, 2008-02-18 at 23:37 +0900, FUJITA Tomonori wrote: > On Mon, 18 Feb 2008 13:55:08 +0100 > Jens Axboe <[EMAIL PROTECTED]> wrote: > > > On Tue, Feb 12 2008, James Bottomley wrote: > > > On Tue, 2008-02-12 at 15:40 -0500, Pete Wyckoff wrote: > > > > If blk_rq_map_user requires more than one bi

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread James Bottomley
On Mon, 2008-02-18 at 15:46 +0100, Jens Axboe wrote: > Seems symmetric to me now, either we fail and everything is cleaned up, > or return success. What remains? My main symmetry complaint was the API: The map takes a request, the unmap takes a bio. James - To unsubscribe from this list: send

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread FUJITA Tomonori
On Mon, 18 Feb 2008 09:09:07 -0600 James Bottomley <[EMAIL PROTECTED]> wrote: > On Mon, 2008-02-18 at 15:46 +0100, Jens Axboe wrote: > > Seems symmetric to me now, either we fail and everything is cleaned up, > > or return success. What remains? > > My main symmetry complaint was the API: The ma

Re: [PATCH] bsg: bidi bio map failure fix

2008-02-18 Thread Jens Axboe
On Mon, Feb 18 2008, James Bottomley wrote: > On Mon, 2008-02-18 at 15:46 +0100, Jens Axboe wrote: > > Seems symmetric to me now, either we fail and everything is cleaned up, > > or return success. What remains? > > My main symmetry complaint was the API: The map takes a request, the > unmap take