Re: [PATCH 4/4] md: fast clone bio in bio_clone_mddev()

2017-02-06 Thread Christoph Hellwig
On Mon, Feb 06, 2017 at 06:43:32PM +0800, Ming Lei wrote: > In theory, ->bio_set still might be NULL in case of failed memory allocation, > please see md_run(). And that's something that should be fixed. Silently not having mempool is very bad behavior.

Re: [PATCH 4/4] md: fast clone bio in bio_clone_mddev()

2017-02-06 Thread Ming Lei
On Mon, Feb 6, 2017 at 4:54 PM, Christoph Hellwig wrote: > On Sun, Feb 05, 2017 at 02:22:13PM +0800, Ming Lei wrote: >> Firstly bio_clone_mddev() is used in raid normal I/O and isn't >> in resync I/O path. >> >> Secondly all the direct access to bvec table in raid happens on >> resync I/O except f

Re: [PATCH 4/4] md: fast clone bio in bio_clone_mddev()

2017-02-06 Thread Christoph Hellwig
On Sun, Feb 05, 2017 at 02:22:13PM +0800, Ming Lei wrote: > Firstly bio_clone_mddev() is used in raid normal I/O and isn't > in resync I/O path. > > Secondly all the direct access to bvec table in raid happens on > resync I/O except for write behind of raid1, in which we still > use bio_clone() fo