Re: [PATCH 1/2] md: remove 'idx' from 'struct resync_pages'

2017-07-12 Thread Ming Lei
On Thu, Jul 13, 2017 at 09:58:41AM +1000, NeilBrown wrote: > On Wed, Jul 12 2017, Ming Lei wrote: > > > bio_add_page() won't fail for resync bio, and the page index for each > > bio is same, so remove it. > > > > More importantly the 'idx' of 'struct resync_pages' is initialized in > > mempool

Re: [PATCH 1/2] md: remove 'idx' from 'struct resync_pages'

2017-07-12 Thread NeilBrown
On Wed, Jul 12 2017, Ming Lei wrote: > bio_add_page() won't fail for resync bio, and the page index for each > bio is same, so remove it. > > More importantly the 'idx' of 'struct resync_pages' is initialized in > mempool allocator function, this way is wrong since mempool is only > responsible

[PATCH 1/2] md: remove 'idx' from 'struct resync_pages'

2017-07-12 Thread Ming Lei
bio_add_page() won't fail for resync bio, and the page index for each bio is same, so remove it. More importantly the 'idx' of 'struct resync_pages' is initialized in mempool allocator function, this way is wrong since mempool is only responsible for allocation, we can't use that for