svn commit: r271929 - stable/10/usr.sbin/ctld

Alexander Motin mav at FreeBSD.org
Sun Sep 21 13:09:06 UTC 2014


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,


More information about the svn-src-stable-10 mailing list