summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-09-18 17:39:04 +0000
committermav <mav@FreeBSD.org>2014-09-18 17:39:04 +0000
commit1ebae729f6959a99d79ece881e4054f6b2a46859 (patch)
tree5fc5b625ed6e6d840085b5b34fa0bd0f55202111 /usr.sbin
parenta0e8dd2d265b0d2c834b95608b7f03db46968d57 (diff)
downloadFreeBSD-src-1ebae729f6959a99d79ece881e4054f6b2a46859.zip
FreeBSD-src-1ebae729f6959a99d79ece881e4054f6b2a46859.tar.gz
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ctld/ctld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
index bfdf5d0..e4c2eda 100644
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -1413,7 +1413,8 @@ conf_apply(struct conf *oldconf, struct conf *newconf)
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,
OpenPOWER on IntegriCloud