diff options
author | mav <mav@FreeBSD.org> | 2014-09-21 13:09:05 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-09-21 13:09:05 +0000 |
commit | 0c6538f05f8cd68fc2d8fb8156c7aa95b58228db (patch) | |
tree | 70a428195b1c129a669f7a1d873ed20e8b54468b /usr.sbin/ctld | |
parent | 88996dc68a17c4b6f4a9ddd00a6cf37897b7c169 (diff) | |
download | FreeBSD-src-0c6538f05f8cd68fc2d8fb8156c7aa95b58228db.zip FreeBSD-src-0c6538f05f8cd68fc2d8fb8156c7aa95b58228db.tar.gz |
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)
Diffstat (limited to 'usr.sbin/ctld')
-rw-r--r-- | usr.sbin/ctld/ctld.c | 3 |
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, |