Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-03-03 Thread Shaohua Li
On Fri, Mar 03, 2017 at 02:22:30PM +0800, Ming Lei wrote: > On Fri, Mar 3, 2017 at 10:20 AM, Ming Lei wrote: > > On Thu, Mar 2, 2017 at 3:52 PM, Shaohua Li wrote: > >> On Thu, Mar 02, 2017 at 10:34:25AM +0800, Ming Lei wrote: > >>> Hi Shaohua, > >>> > >>> On Wed, Mar 1, 2017 at 7:42 AM, Shaohua L

Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-03-02 Thread Ming Lei
On Fri, Mar 3, 2017 at 10:20 AM, Ming Lei wrote: > On Thu, Mar 2, 2017 at 3:52 PM, Shaohua Li wrote: >> On Thu, Mar 02, 2017 at 10:34:25AM +0800, Ming Lei wrote: >>> Hi Shaohua, >>> >>> On Wed, Mar 1, 2017 at 7:42 AM, Shaohua Li wrote: >>> > On Tue, Feb 28, 2017 at 11:41:39PM +0800, Ming Lei wro

Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-03-02 Thread Ming Lei
On Thu, Mar 2, 2017 at 3:52 PM, Shaohua Li wrote: > On Thu, Mar 02, 2017 at 10:34:25AM +0800, Ming Lei wrote: >> Hi Shaohua, >> >> On Wed, Mar 1, 2017 at 7:42 AM, Shaohua Li wrote: >> > On Tue, Feb 28, 2017 at 11:41:39PM +0800, Ming Lei wrote: >> >> Use this helper, instead of direct access to .b

Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-03-02 Thread Shaohua Li
On Thu, Mar 02, 2017 at 10:34:25AM +0800, Ming Lei wrote: > Hi Shaohua, > > On Wed, Mar 1, 2017 at 7:42 AM, Shaohua Li wrote: > > On Tue, Feb 28, 2017 at 11:41:39PM +0800, Ming Lei wrote: > >> Use this helper, instead of direct access to .bi_vcnt. > > > > what We really need to do for the behind

Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-03-01 Thread Ming Lei
Hi Shaohua, On Wed, Mar 1, 2017 at 7:42 AM, Shaohua Li wrote: > On Tue, Feb 28, 2017 at 11:41:39PM +0800, Ming Lei wrote: >> Use this helper, instead of direct access to .bi_vcnt. > > what We really need to do for the behind IO is: > - allocate memory and copy bio data to the memory > - let behin

Re: [PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-02-28 Thread Shaohua Li
On Tue, Feb 28, 2017 at 11:41:39PM +0800, Ming Lei wrote: > Use this helper, instead of direct access to .bi_vcnt. what We really need to do for the behind IO is: - allocate memory and copy bio data to the memory - let behind bio do IO against the memory The behind bio doesn't need to have the ex

[PATCH v2 09/13] md: raid1: use bio_segments_all()

2017-02-28 Thread Ming Lei
Use this helper, instead of direct access to .bi_vcnt. Signed-off-by: Ming Lei --- drivers/md/raid1.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 316bd6dd6cc1..7396c99ff7b1 100644 --- a/drivers/md/raid1.c +++ b/drivers/