]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Teach ctl_add_initiator() to dynamically allocate IIDs from pool.
authorAlexander Motin <mav@FreeBSD.org>
Mon, 7 Jul 2014 09:37:22 +0000 (09:37 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Mon, 7 Jul 2014 09:37:22 +0000 (09:37 +0000)
commit604e257984185ecd666efa4f8db473471b743f2e
tree556322b32c5456bd0101529ae4c7d483d86fdcd8
parent0f8de8afaa7448ecbb10c7fd0c61191a2b78f01d
Teach ctl_add_initiator() to dynamically allocate IIDs from pool.

If port passed negative IID value, the function will try to allocate IID
from the pool of unused, based on passed wwpn or name arguments.  It does
all its best to make IID unique and persistent across reconnects.

This makes persistent reservation properly work for iSCSI.  Previously,
in case of reconnects, reservation could be unexpectedly lost, or even
migrate between intiators.
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl_frontend.c
sys/cam/ctl/ctl_frontend.h
sys/cam/ctl/ctl_frontend_iscsi.c
sys/cam/ctl/ctl_frontend_iscsi.h
sys/cam/ctl/ctl_private.h
sys/cam/ctl/scsi_ctl.c