Date: Thu, 19 Feb 2015 14:26:50 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r279000 - stable/10/usr.sbin/ctld Message-ID: <201502191426.t1JEQoOm099551@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Feb 19 14:26:49 2015 New Revision: 279000 URL: https://svnweb.freebsd.org/changeset/base/279000 Log: MFC r274804: In conf_apply() remove iSCSI ports from kernel before removing LUNs. Previous order confused initiators with messages about "removed" LUNs during simple ctld restart without any real config change. After this commit initiators only reestablish lost connection, receive "Power on occurred" UNIT ATTENTION status and continue normal operation. Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Thu Feb 19 13:06:38 2015 (r278999) +++ stable/10/usr.sbin/ctld/ctld.c Thu Feb 19 14:26:49 2015 (r279000) @@ -1664,6 +1664,16 @@ conf_apply(struct conf *oldconf, struct */ newtarg = target_find(newconf, oldtarg->t_name); if (newtarg == NULL) { + error = kernel_port_remove(oldtarg); + if (error != 0) { + log_warnx("failed to remove target %s", + oldtarg->t_name); + /* + * XXX: Uncomment after fixing the root cause. + * + * cumulated_error++; + */ + } TAILQ_FOREACH_SAFE(oldlun, &oldtarg->t_luns, l_next, tmplun) { log_debugx("target %s not found in new " @@ -1680,16 +1690,6 @@ conf_apply(struct conf *oldconf, struct cumulated_error++; } } - error = kernel_port_remove(oldtarg); - if (error != 0) { - log_warnx("failed to remove target %s", - oldtarg->t_name); - /* - * XXX: Uncomment after fixing the root cause. - * - * cumulated_error++; - */ - } continue; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502191426.t1JEQoOm099551>