From 2741d0d3fe28c55fb94800a0bd08f3063308d0e2 Mon Sep 17 00:00:00 2001 From: adam radford Date: Mon, 19 Mar 2012 19:50:00 -0700 Subject: [PATCH] --- yaml --- r: 302431 b: refs/heads/master c: c1529fa25e20f4c5d92d82165a8ff5fe27eae974 h: refs/heads/master i: 302429: 3fa3d6161b7cc59d5d2ddf02ae19b5cafa7c2c26 302427: 73555c14767999bb2de30fdf5e2c5f1402a4244b 302423: 18d37258763ddd7b1e4023df2caccd8bccb98958 302415: f812b56b567d0deea8c4b1472865662d4c4ea19c 302399: 90ee5a08b9384031cedc75e357b77b23942a133c v: v3 --- [refs] | 2 +- trunk/drivers/scsi/megaraid/megaraid_sas_fp.c | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index dd0ed79b87a5..e22c21d26e79 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5738f996432589eebe88db21f4a9cb8ee5f04872 +refs/heads/master: c1529fa25e20f4c5d92d82165a8ff5fe27eae974 diff --git a/trunk/drivers/scsi/megaraid/megaraid_sas_fp.c b/trunk/drivers/scsi/megaraid/megaraid_sas_fp.c index 294abb0defa6..e3d251a2e26a 100644 --- a/trunk/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/trunk/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -362,15 +362,20 @@ MR_BuildRaidContext(struct megasas_instance *instance, /* assume this IO needs the full row - we'll adjust if not true */ regSize = stripSize; - /* If IO spans more than 1 strip, fp is not possible - FP is not possible for writes on non-0 raid levels - FP is not possible if LD is not capable */ - if (num_strips > 1 || (!isRead && raid->level != 0) || - !raid->capability.fpCapable) { + /* Check if we can send this I/O via FastPath */ + if (raid->capability.fpCapable) { + if (isRead) + io_info->fpOkForIo = (raid->capability.fpReadCapable && + ((num_strips == 1) || + raid->capability. + fpReadAcrossStripe)); + else + io_info->fpOkForIo = (raid->capability.fpWriteCapable && + ((num_strips == 1) || + raid->capability. + fpWriteAcrossStripe)); + } else io_info->fpOkForIo = FALSE; - } else { - io_info->fpOkForIo = TRUE; - } if (numRows == 1) { /* single-strip IOs can always lock only the data needed */