md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.
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.
--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid5.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.4
Quoted 14 lines · 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_FLUSHto achieve this. ButREQ_NOMERGEcan do the same work.Signed-off-by Jianpeng Ma <[email protected]>--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/raid5.c +0
-0
drivers/md/raid5.c static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) · line 778
Quoted 8 lines
drivers/md/raid5.c +1
-1@@ -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
Quoted 29 lines · On Wed, 30 Oct 2013 10:41:46 +0800 majianpeng <[email protected]> wrote:
Quoted 15 lines
For R5_ReadNoMerge,it mean this bio can't merge with other bios or request.It used
REQ_FLUSHto achieve this. ButREQ_NOMERGEcan do the same work.Signed-off-by Jianpeng Ma <[email protected]>--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/raid5.c +0
-0drivers/md/raid5.c static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) · line 778
Quoted 8 lines
drivers/md/raid5.c +1
-1@@ -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.
Quoted 8 lines
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
Quoted 3 lines
Thanks,
NeilBrown
Quoted 22 lines · NeilBrown
Quoted 20 lines · 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_FLUSHto achieve this. ButREQ_NOMERGEcan do the same work.Signed-off-by Jianpeng Ma <[email protected]>--- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/raid5.c +1
-1@@ -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 ;
Quoted 6 lines
drivers/md/raid5.c static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) · line 778
Quoted 2 lines
drivers/md/raid5.c +0
-0bi->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.
Signature · 1 line
Jens Axboe