Page MenuHomeFreeBSD

mps(4): Fix unmatched devq release.
ClosedPublic

Authored by imp on Dec 1 2021, 11:37 PM.

Details

Summary

Port 9781c28c6d63 and a8837c77efd0 to the mps driver. Before this
change devq was frozen only if some command was sent to the target after
reset started, but release was called always. This change freezes the
devq immediately, leaving mprsas_action_scsiio() check only to cover
race condition due to different lock devq use.

This should also avoid unnecessary requeue of the commands, creating
additional log noise and confusing some broken apps. It also avoids a
'busy' requeue of I/Os failing when we're doing recovery that takes
longer than the normal busy timeout. These I/Os failing can lead to
filesystems being unmounted in the force unmount case for I/O errors.

Sponsored by: Netflix

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp requested review of this revision.Dec 1 2021, 11:37 PM

It looks good, but why leave textual differences from mpr in some log levels and comments?

This revision is now accepted and ready to land.Dec 2 2021, 1:56 AM
In D33228#750953, @mav wrote:

It looks good, but why leave textual differences from mpr in some log levels and comments?

Hmmmm, that wasn't my intent. I'll double check those tomorrow and update as needed. Thanks for validating the basic concept though.

This should match mpr exactly, modulo the mpr->mps changes
and no function trace because mps doesn't have that.

This revision now requires review to proceed.Dec 2 2021, 5:34 PM
This revision is now accepted and ready to land.Dec 2 2021, 5:40 PM

tiny tweaks to the form of comments, etc to ensure that we have the same code in
both mpr and mps and there's no gratuitous differences.

This revision now requires review to proceed.Dec 2 2021, 8:15 PM
In D33228#751247, @imp wrote:

tiny tweaks to the form of comments, etc to ensure that we have the same code in
both mpr and mps and there's no gratuitous differences.

The update was purely whitespace from the earlier one (or nothing, phab makes it
too hard to know for sure).

This revision was not accepted when it landed; it landed in state Needs Review.Dec 2 2021, 9:06 PM
This revision was automatically updated to reflect the committed changes.