On Tuesday June 13, liudows2@xxxxxxxxx wrote: > hello,everyone. > I am studying the code of raid0.But I find that the logic of > raid0_make_request is a little difficult to understand. > Who can tell me what the function of raid0_make_request will do eventually? One of two possibilities. Most often it will update bio->bi_dev and bio->bi_sector to refer to the correct location on the correct underlying devices, and then will return '1'. The fact that it returns '1' is noticed by generic_make_request in block/ll_rw_block.c and generic_make_request will loop around and retry the request on the new device at the new offset. However in the unusual case that the request cross a chunk boundary and so needs to be sent to two different devices, raidi_make_request will split the bio into to (using bio_split) will submit each of the two bios directly down to the appropriate devices - and will then return '0', so that generic make request doesn't loop around. I hope that helps. NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html