[dm-devel] [PATCH] Fixes for clone_bio and __clone_and_map functions in dm.c

Alasdair G Kergon agk at redhat.com
Mon Mar 20 00:04:41 UTC 2006


On Sun, Mar 19, 2006 at 10:24:00AM -0800, Abhishek Gupta wrote:
> I found a small bug in the clone_bio() function in dm.c . The number of bio
> vectors in the cloned bio is incorrectly set to the index of the last bio
> vector in its range. I have corrected it in the attached patch.

I don't see that yet - the code is not very transparent though.
(Look at the places that call the function.)
 
> I encountered another problem in the final else condition of
> __clone_and_map()
> function where the bio vector is split in to two parts. 

Yes, that looks wrong, as Dan reported on IRC this week.
The patch needs a little tidying up though.
[only one split_bvec() call not two?
 reconsider loop entry/exit to avoid artificial-looking exit?]

Alasdair
-- 
agk at redhat.com




More information about the dm-devel mailing list