Thread (2 messages) 2 messages, 2 authors, 2013-03-04

Re: [PATCH 2/4] md/raid5: Tune judgements order.

From: NeilBrown <hidden>
Date: 2013-03-04 01:49:40

On Thu, 28 Feb 2013 15:50:47 +0800 majianpeng [off-list ref] wrote:
quoted hunk ↗ jump to hunk
To reduce the unnecessary function call in certain condtitions,it should
tune judgements order.

Signed-off-by: Jianpeng Ma <redacted>
---
 drivers/md/raid5.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 59c0569..bd49623 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4665,9 +4665,10 @@ static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int
 		*skipped = 1;
 		return rv;
 	}
-	if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
-	    !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
-	    !conf->fullsync && sync_blocks >= STRIPE_SECTORS) {
+	if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
+		!conf->fullsync &&
+		!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
+		sync_blocks >= STRIPE_SECTORS) {
 		/* we can skip this block, and probably more */
 		sync_blocks /= STRIPE_SECTORS;
 		*skipped = 1;
applied, thanks (after fixing up the formatting).

NeilBrown

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help