Project

General

Profile

Bug #10269

Feature #6285: Native Fiber Channel Support

Fibre Channel port down is not reliable/safe

Added by Alexander Motin over 5 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Important
Assignee:
Alexander Motin
Category:
OS
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Active testing of bringing FC ports up/down under load exposed numerous issues in that area, causing full range of problems from stuck commands to system crashes. It was not critical for existing FreeNAS FC users since ports there were brought up only once and never brought down. But it becomes more important for FC ports controlled by ctld, that will be brought down in case of ctld service stop. I've already localized two bugs, but I suppose there more.

Associated revisions

Revision c2ab7172 (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81)

Revision c2ab7172 (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81)

Revision 65eff321 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904)

Revision 65eff321 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904)

Revision 2538daf8 (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81) (cherry picked from commit c2ab7172b9b83ee7b1cff70093cc80a13854cf08)

Revision 2538daf8 (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81) (cherry picked from commit c2ab7172b9b83ee7b1cff70093cc80a13854cf08)

Revision 6f16c687 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904) (cherry picked from commit 65eff3217297075c36e1cb580c2ca636f122af96)

Revision 6f16c687 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904) (cherry picked from commit 65eff3217297075c36e1cb580c2ca636f122af96)

Revision 1f77064c (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81) (cherry picked from commit c2ab7172b9b83ee7b1cff70093cc80a13854cf08)

Revision 1f77064c (diff)
Added by Alexander Motin over 5 years ago

In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 75ee04ccbc679185abd28459b04cfcc3a4cb4c81) (cherry picked from commit c2ab7172b9b83ee7b1cff70093cc80a13854cf08)

Revision 17ee6b19 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904) (cherry picked from commit 65eff3217297075c36e1cb580c2ca636f122af96)

Revision 17ee6b19 (diff)
Added by Alexander Motin over 5 years ago

Change ATIO/INOT counting to prevent periph destruction while requests are still running inside CTL. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit b4dd23a67ce44b7770b66377154e06f7efa23904) (cherry picked from commit 65eff3217297075c36e1cb580c2ca636f122af96)

Revision 29cc55cb (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa)

Revision 29cc55cb (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa)

Revision 4535054a (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa) (cherry picked from commit 29cc55cbe620b022ba11c83a5641fa4d98f1776d)

Revision 4535054a (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa) (cherry picked from commit 29cc55cbe620b022ba11c83a5641fa4d98f1776d)

Revision 06519a0b (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa) (cherry picked from commit 29cc55cbe620b022ba11c83a5641fa4d98f1776d)

Revision 06519a0b (diff)
Added by Alexander Motin about 5 years ago

Remove device queue freeze handling and replace it with dummy. At this point CTL has no known use case for device queue freezes. Same time existing (considered to be broken) code was found to cause modify-after-free issues. Discussed with: ken Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit f437130e8b002db4ebb7f417e6195f5000c171fa) (cherry picked from commit 29cc55cbe620b022ba11c83a5641fa4d98f1776d)

Revision d984a295 (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e)

Revision d984a295 (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e)

Revision 89071f21 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff)

Revision 89071f21 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff)

Revision ed48e4e6 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff) (cherry picked from commit 89071f21773969fc7616079144a3d9bbbd63c68e)

Revision ed48e4e6 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff) (cherry picked from commit 89071f21773969fc7616079144a3d9bbbd63c68e)

Revision 759b42ea (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e) (cherry picked from commit d984a2959993b349ae14b413dafe0a7064d26a05)

Revision 759b42ea (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e) (cherry picked from commit d984a2959993b349ae14b413dafe0a7064d26a05)

Revision db8e60e8 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff) (cherry picked from commit 89071f21773969fc7616079144a3d9bbbd63c68e)

Revision db8e60e8 (diff)
Added by Alexander Motin about 5 years ago

Remove some dead and duplicate LUN enabling code. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 46a5dc8ca07a24c2e46e9ffbdc6dd40497c865ff) (cherry picked from commit 89071f21773969fc7616079144a3d9bbbd63c68e)

Revision 765d2d6e (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e) (cherry picked from commit d984a2959993b349ae14b413dafe0a7064d26a05)

Revision 765d2d6e (diff)
Added by Alexander Motin about 5 years ago

Bring per-port LUN enable/disable code up to date: - remove last remnants of never implemented multiple targets support; - implement missing support for LUN mapping in this area. Due to existing locking constraints LUN mapping code is practically unlocked at this point. Hopefully it is not racy enough to live until somebody get idea how to call sleeping fronend methods under lock also taken by the same frontend in non-sleepable context. :( Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit af681a3020b9e04a4415de9a2d00fbcd2eb3047e) (cherry picked from commit d984a2959993b349ae14b413dafe0a7064d26a05)

Revision 45118610 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8)

Revision 45118610 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8)

Revision 3d791432 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8) (cherry picked from commit 451186100390bde3e0397631f2e4042da59b8841)

Revision 3d791432 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8) (cherry picked from commit 451186100390bde3e0397631f2e4042da59b8841)

Revision 985f63c5 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8) (cherry picked from commit 451186100390bde3e0397631f2e4042da59b8841)

Revision 985f63c5 (diff)
Added by Alexander Motin about 5 years ago

Move ctlfe_onoffline() out of lock to let it sleep when needed. Do some more other polishing while there. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 792faf07618bd346623cf0c180b62fc6e7ff6da8) (cherry picked from commit 451186100390bde3e0397631f2e4042da59b8841)

Revision b597c869 (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de)

Revision b597c869 (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de)

Revision e3fb314e (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de) (cherry picked from commit b597c869a717598146b21b0df0d8c4a55decd0c2)

Revision e3fb314e (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de) (cherry picked from commit b597c869a717598146b21b0df0d8c4a55decd0c2)

Revision 5d42663b (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de) (cherry picked from commit b597c869a717598146b21b0df0d8c4a55decd0c2)

Revision 5d42663b (diff)
Added by Alexander Motin about 5 years ago

Rewrite port database handling for target mode. Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Ticket: #10269 Merge-FN93: yes Merge-TN93: yes (cherry picked from commit 5a9c7208894b620cd8f1a83e03ef9eb8a0c2c8de) (cherry picked from commit b597c869a717598146b21b0df0d8c4a55decd0c2)

History

#1 Updated by Alexander Motin about 5 years ago

  • Status changed from Investigation to Ready For Release

After half dozen committed patches I can finally flip busy FC ports up and down many times either directly or through ctld restarts without ill effects.

#2 Updated by Jordan Hubbard about 5 years ago

  • Status changed from Ready For Release to Resolved

#3 Avatar?id=14398&size=24x24 Updated by Kris Moore about 4 years ago

  • Target version changed from Unspecified to N/A

Also available in: Atom PDF