From owner-svn-src-stable@FreeBSD.ORG Sun Sep 21 13:09:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E165385; Sun, 21 Sep 2014 13:09:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 392FC894; Sun, 21 Sep 2014 13:09:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8LD96UL077804; Sun, 21 Sep 2014 13:09:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8LD96r8077803; Sun, 21 Sep 2014 13:09:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409211309.s8LD96r8077803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 21 Sep 2014 13:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271929 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2014 13:09:06 -0000 Author: mav Date: Sun Sep 21 13:09:05 2014 New Revision: 271929 URL: http://svnweb.freebsd.org/changeset/base/271929 Log: MFC r271797: Make kernel to update LUN size from the backing storage on configuration reload also if that size was not specified in the new configuration. Previously it happened only if size was explicitly changed in config. Approved by: re (delphij) 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 Sun Sep 21 12:07:22 2014 (r271928) +++ stable/10/usr.sbin/ctld/ctld.c Sun Sep 21 13:09:05 2014 (r271929) @@ -1413,7 +1413,8 @@ conf_apply(struct conf *oldconf, struct if (oldtarg != NULL) { oldlun = lun_find(oldtarg, newlun->l_lun); if (oldlun != NULL) { - if (newlun->l_size != oldlun->l_size) { + if (newlun->l_size != oldlun->l_size || + newlun->l_size == 0) { log_debugx("resizing lun %d, " "target %s, CTL lun %d", newlun->l_lun,