https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297999
Bug ID: 297999
Summary: cam: inappropriate error handling for ZBC drives
Product: Base System
Version: 16.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
CAM currently treats write pointer violations (ASC 0x21, ASCQ 0x04) as
retryable errors. That's wrong; if a ZBC disk rejected a write once because
its LBA didn't match the write pointer, then it will reject it again. Also,
once the retries finish, CAM currently returns EIO. That's not a very helpful
errno, IMHO, because it suggests to the code that the hardware is broken. In
fact, such an error means that the application software is buggy. It's the
same story for all these error codes:
Unaligned Write Command (ASC 0x21, ASCQ 0x04)
Write Boundary Violation (ASC 0x21, ASCQ 0x05)
Attempt to Read Invalid Data (ASC 0x21, ASCQ 0x06)
Read Boundary Violation (ASC 0x21, ASCQ 0x07)
Zone is Offline (ASC 0x2c, ASCQ 0x0e)
Insufficient Zone Resources (ASC 0x55, ASCQ 0x0E)
The following error codes are already correctly treated as fatal
Zone is Inactive (ASC 0x2c, ASCQ 0x12, EINVAL)
Attempt to Access Gap Zone (ASC 0x21, ASCQ 0x09, EINVAL)
Zone is read only (ASC 0x27, ASCQ 0x08, EACCES)
I suggest that all of the above errors be treated as fatal. As for errnos, we
could use EMFILE for Insufficient Zone Resources and EACCES for "Zone is
Offline". But for the others, no current errno feels satisfactory to me.
EINVAL is close, but that errno is already heavily overloaded. A new error
code like EBADZONE (Storage Zone Access Violation) would be nice, but I don't
know if it's worth the trouble.
FWIW, Linux debated a patch to deliberately make Unaligned Write Commands
retryable, but it never got merged:
https://www.spinics.net/lists/linux-scsi/msg207563.html .
--
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.