Skip to contentSkip to conversation

md/raid5: For stripe with R5_ReadNoMerge, we replace REQ_FLUSH with REQ_NOMERGE.

PATCH In review majianpeng 4 participants 4 messages Oct 30, 2013 – Oct 31, 2013 MD RAID

lore
Share & tools
lore

majianpeng

author
#0 lore raw

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
index f8b9068..8e0aeaa 100644
@@ -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
#1 lore raw
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_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 +0 -0
index f8b9068..8e0aeaa 100644

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

#2 lore raw
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_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 +0 -0
index f8b9068..8e0aeaa 100644

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.

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

#3 lore raw
In reply to 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_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
index f8b9068..8e0aeaa 100644
@@ -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 -0
 			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.

Signature · 1 line
Jens Axboe