2013-10-30 02:41:55

by majianpeng

[permalink] [raw]
Subject: [PATCH 3/3] md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.

For R5_ReadNoMerge,it mean this bio can't merge with other bios or
request.It used REQ_FLUSH to achieve this. But REQ_NOMERGE can do the
same work.

Signed-off-by: Jianpeng Ma <[email protected]>
---
drivers/md/raid5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index f8b9068..8e0aeaa 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -772,7 +772,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
bi->bi_sector = (sh->sector
+ rdev->data_offset);
if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
- bi->bi_rw |= REQ_FLUSH;
+ bi->bi_rw |= REQ_NOMERGE;

bi->bi_vcnt = 1;
bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
--
1.8.4????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?


2013-10-31 03:11:10

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH 3/3] md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.

On Wed, 30 Oct 2013 10:41:46 +0800 majianpeng <[email protected]> wrote:

> For R5_ReadNoMerge,it mean this bio can't merge with other bios or
> request.It used REQ_FLUSH to achieve this. But REQ_NOMERGE can do the
> same work.
>
> Signed-off-by: Jianpeng Ma <[email protected]>
> ---
> drivers/md/raid5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index f8b9068..8e0aeaa 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -772,7 +772,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
> bi->bi_sector = (sh->sector
> + rdev->data_offset);
> if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
> - bi->bi_rw |= REQ_FLUSH;
> + bi->bi_rw |= REQ_NOMERGE;
>
> bi->bi_vcnt = 1;
> bi->bi_io_vec[0].bv_len = STRIPE_SIZE;

Thanks.

I've queued this up pending Jens' acceptance of the other patches.

By the way, your patch file has a carriage return as well as a newline at the
end of each line.
"patch" can still handle them but "git am" doesn't like it.

If you are able to send the patches as plain text with just a NEWLINE at the
end of each line, rather than base64 encodes with carriage returns, it would
help a little.

Thanks,
NeilBrown


Attachments:
signature.asc (828.00 B)

2013-10-31 05:24:19

by kedacomkernel

[permalink] [raw]
Subject: Re: Re: [PATCH 3/3] md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.

>On Wed, 30 Oct 2013 10:41:46 +0800 majianpeng <[email protected]> wrote:
>
>> For R5_ReadNoMerge,it mean this bio can't merge with other bios or
>> request.It used REQ_FLUSH to achieve this. But REQ_NOMERGE can do the
>> same work.
>>
>> Signed-off-by: Jianpeng Ma <[email protected]>
>> ---
>> drivers/md/raid5.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
>> index f8b9068..8e0aeaa 100644
>> --- a/drivers/md/raid5.c
>> +++ b/drivers/md/raid5.c
>> @@ -772,7 +772,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
>> bi->bi_sector = (sh->sector
>> + rdev->data_offset);
>> if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
>> - bi->bi_rw |= REQ_FLUSH;
>> + bi->bi_rw |= REQ_NOMERGE;
>>
>> bi->bi_vcnt = 1;
>> bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
>
>Thanks.
>
>I've queued this up pending Jens' acceptance of the other patches.
>
>By the way, your patch file has a carriage return as well as a newline at the
>end of each line.
>"patch" can still handle them but "git am" doesn't like it.
>
>If you are able to send the patches as plain text with just a NEWLINE at the
>end of each line, rather than base64 encodes with carriage returns, it would
>help a little.
>
Sorroy for that, i'll pay attention to this.
Thanks!
Jianpeng Ma

>Thanks,
>NeilBrown
>????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2013-10-31 14:10:20

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH 3/3] md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.

On Thu, Oct 31 2013, NeilBrown wrote:
> On Wed, 30 Oct 2013 10:41:46 +0800 majianpeng <[email protected]> wrote:
>
> > For R5_ReadNoMerge,it mean this bio can't merge with other bios or
> > request.It used REQ_FLUSH to achieve this. But REQ_NOMERGE can do the
> > same work.
> >
> > Signed-off-by: Jianpeng Ma <[email protected]>
> > ---
> > drivers/md/raid5.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> > index f8b9068..8e0aeaa 100644
> > --- a/drivers/md/raid5.c
> > +++ b/drivers/md/raid5.c
> > @@ -772,7 +772,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
> > bi->bi_sector = (sh->sector
> > + rdev->data_offset);
> > if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
> > - bi->bi_rw |= REQ_FLUSH;
> > + bi->bi_rw |= REQ_NOMERGE;
> >
> > bi->bi_vcnt = 1;
> > bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
>
> Thanks.
>
> I've queued this up pending Jens' acceptance of the other patches.

I've queued up the other two for 3.13.

--
Jens Axboe