From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Samy Lahfa <samy+kernel@lahfa.xyz>
Cc: vt@altlinux.org, chandrakanth.patil@broadcom.com,
kashyap.desai@broadcom.com, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com, megaraidlinux.pdl@broadcom.com,
shivasharan.srikanteshwara@broadcom.com,
sumit.saxena@broadcom.com
Subject: Re: megaraid_sas: multiple FALLOC_FL_ZERO_RANGE causes timeouts and resets on MegaRAID 9560-8i 4GB since 5.19
Date: Mon, 10 Mar 2025 22:24:53 -0400 [thread overview]
Message-ID: <yq134fkpapb.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250309135728.3140904-1-samy+kernel@lahfa.xyz> (Samy Lahfa's message of "Sun, 9 Mar 2025 14:55:31 +0100")
Samy,
> I have just ran into this issue, controller resets and timeouts
> (running mkfs.ext4 or mkfs.xfs to reproduce) and bisected it to the
> same commit :
Can you try the patch below?
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 88acefbf9aea..8ced3f1fd427 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -2106,6 +2106,9 @@ static int megasas_device_configure(struct scsi_device *sdev,
/* This sdev property may change post OCR */
megasas_set_dynamic_target_properties(sdev, lim, is_target_prop);
+ if (!MEGASAS_IS_LOGICAL(sdev))
+ sdev->no_vpd_size = 1;
+
mutex_unlock(&instance->reset_mutex);
return 0;
@@ -3665,8 +3668,10 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
case MFI_STAT_SCSI_IO_FAILED:
case MFI_STAT_LD_INIT_IN_PROGRESS:
- cmd->scmd->result =
- (DID_ERROR << 16) | hdr->scsi_status;
+ if (hdr->scsi_status == 0xf0)
+ cmd->scmd->result = (DID_ERROR << 16) | SAM_STAT_CHECK_CONDITION;
+ else
+ cmd->scmd->result = (DID_ERROR << 16) | hdr->scsi_status;
break;
case MFI_STAT_SCSI_DONE_WITH_ERROR:
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 6c1fb8149553..7d28b5b23751 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2043,7 +2043,10 @@ map_cmd_status(struct fusion_context *fusion,
case MFI_STAT_SCSI_IO_FAILED:
case MFI_STAT_LD_INIT_IN_PROGRESS:
- scmd->result = (DID_ERROR << 16) | ext_status;
+ if (ext_status == 0xf0)
+ scmd->result = (DID_ERROR << 16) | SAM_STAT_CHECK_CONDITION;
+ else
+ scmd->result = (DID_ERROR << 16) | ext_status;
break;
case MFI_STAT_SCSI_DONE_WITH_ERROR:
next prev parent reply other threads:[~2025-03-11 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-10 1:18 megaraid_sas: multiple FALLOC_FL_ZERO_RANGE causes timeouts and resets on MegaRAID 9560-8i 4GB since 5.19 Vitaly Chikunov
2024-02-15 15:18 ` Vitaly Chikunov
2024-02-15 18:42 ` Martin K. Petersen
2024-02-16 10:08 ` Vitaly Chikunov
2025-03-09 13:55 ` Samy Lahfa
2025-03-11 2:24 ` Martin K. Petersen [this message]
2025-03-15 17:12 ` Ryan Lahfa
2025-03-18 1:38 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq134fkpapb.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=chandrakanth.patil@broadcom.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=samy+kernel@lahfa.xyz \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.com \
--cc=vt@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.