From 4e932574fbef709769d2454c9f2aa543e4371d1b Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 5 Jul 2014 18:15:00 +0000 Subject: Create separate CTL port for every iSCSI target (and maybe portal group). Having single port for all iSCSI connections makes problematic implementing some more advanced SCSI functionality in CTL, that require proper ports enumeration and identification. This change extends CTL iSCSI API, making ctld daemon to control list of iSCSI ports in CTL. When new target is defined in config fine, ctld will create respective port in CTL. When target is removed -- port will be also removed after all active commands through that port properly aborted. This change require ctld to be rebuilt to match the kernel. As a minor side effect, this allows to have iSCSI targets without LUNs. While that may look odd and not very useful, that is not incorrect. --- usr.sbin/ctld/ctld.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ctld/ctld.h') diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index 3399648..5f7aea6 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -272,8 +272,8 @@ int kernel_lun_add(struct lun *lun); int kernel_lun_resize(struct lun *lun); int kernel_lun_remove(struct lun *lun); void kernel_handoff(struct connection *conn); -int kernel_port_on(void); -int kernel_port_off(void); +int kernel_port_add(struct target *targ); +int kernel_port_remove(struct target *targ); void kernel_capsicate(void); #ifdef ICL_KERNEL_PROXY -- cgit v1.1