Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157403780
D32650.id97440.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32650.id97440.diff
View Options
Index: sys/dev/iscsi/iscsi.c
===================================================================
--- sys/dev/iscsi/iscsi.c
+++ sys/dev/iscsi/iscsi.c
@@ -892,15 +892,39 @@
}
ccb = io->io_ccb;
- if (ntohl(bhssr->bhssr_expdatasn) != io->io_datasn) {
- ISCSI_SESSION_WARN(is,
- "ExpDataSN mismatch in SCSI Response (%u vs %u)",
- ntohl(bhssr->bhssr_expdatasn), io->io_datasn);
- icl_pdu_free(response);
- iscsi_session_reconnect(is);
- ISCSI_SESSION_UNLOCK(is);
- return;
+ if (bhssr->bhssr_response == BHSSR_RESPONSE_COMMAND_COMPLETED) {
+ if (ntohl(bhssr->bhssr_expdatasn) != io->io_datasn) {
+ ISCSI_SESSION_WARN(is,
+ "ExpDataSN mismatch in SCSI Response (%u vs %u)",
+ ntohl(bhssr->bhssr_expdatasn), io->io_datasn);
+
+ /*
+ * XXX: Permit an ExpDataSN of zero for errors.
+ *
+ * This doesn't conform to RFC 7143, but some
+ * targets seem to do this.
+ */
+ if (bhssr->bhssr_status != 0 &&
+ bhssr->bhssr_expdatasn == htonl(0))
+ goto skip_expdatasn;
+
+ icl_pdu_free(response);
+ iscsi_session_reconnect(is);
+ ISCSI_SESSION_UNLOCK(is);
+ return;
+ }
+ } else {
+ if (bhssr->bhssr_expdatasn != htonl(0)) {
+ ISCSI_SESSION_WARN(is,
+ "ExpDataSN mismatch in SCSI Response (%u vs 0)",
+ ntohl(bhssr->bhssr_expdatasn));
+ icl_pdu_free(response);
+ iscsi_session_reconnect(is);
+ ISCSI_SESSION_UNLOCK(is);
+ return;
+ }
}
+skip_expdatasn:
/*
* With iSER, after getting good response we can be sure
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 12:58 AM (11 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33411649
Default Alt Text
D32650.id97440.diff (1 KB)
Attached To
Mode
D32650: Further refine the ExpDataSN checks for SCSI Response PDUs.
Attached
Detach File
Event Timeline
Log In to Comment