"Also sprach ptb:" > mbio = bio_clone(bio, GFP_NOIO); > ... > mbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset; OK - the GFP_NOIO includes wait flags, so it seems to wait at least for a bit. include/linux/gfp.h:#define GFP_NOIO (__GFP_WAIT) But can't the allocation still fail sometimes? And if not won't we just stall forever in a deadlock if for example the only available memory is in buffers that are aimed at this same raid device? > but I don't think bio_clone is GUARANTEED to produce a non-null result, > is it? It uses bio_alloc to get a bio, and bio_alloc does ... > > bio = mempool_alloc(bio_pool, gfp_mask); > if (unlikely(!bio)) > goto out; > > out: > return bio; > } > > mempool_free(bio, bio_pool); > bio = NULL; > goto out; > > So it looks perfectly capable of producing a NULL. Peter - 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