HomeFreeBSD

ctld: if adding a target fails, retry it on the next reload

Description

ctld: if adding a target fails, retry it on the next reload

If the admin creates more CTL ports than kern.cam.ctl.max_ports, then
adding some will fail. If he then removes some ports and does
"service ctld reload", he would expect that the new ports would get
added in the newly-freed port space. But they don't, because ctld
assigned them port numbers during their first creation attempts.

Fix this bug by removing newly created ports from ctld's internal list
if the kernel rejects them for any reason. That way, a subsequent
config reload will attempt to add them again, possibly with new port
numbers.

Sponsored by: Axcient
Reviewed by: jhb, mav
Differential Revision: https://reviews.freebsd.org/D36974

(cherry picked from commit 15b3e3bb7efcbf7c29ab76e9ea7990c17df790e6)

Details

Provenance
asomersAuthored on Oct 12 2022, 10:44 PM
Reviewer
jhb
Differential Revision
D36974: ctld: if adding a target fails, retry it on the next reload
Parents
rG4a0c5d391f8a: fusefs: fix VOP_ADVLOCK with SEEK_END
Branches
Unknown
Tags
Unknown