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
This commit is contained in:
Alexander Motin 2014-09-18 17:39:04 +00:00
parent 08be57e51c
commit 8cf98331b0

View File

@ -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,