Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2014 17:39:04 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271797 - head/usr.sbin/ctld
Message-ID:  <201409181739.s8IHd44p062653@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Sep 18 17:39:04 2014
New Revision: 271797
URL: http://svnweb.freebsd.org/changeset/base/271797

Log:
  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.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/ctld/ctld.c

Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c	Thu Sep 18 17:37:19 2014	(r271796)
+++ head/usr.sbin/ctld/ctld.c	Thu Sep 18 17:39:04 2014	(r271797)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409181739.s8IHd44p062653>