diff options
author | mav <mav@FreeBSD.org> | 2015-10-05 08:52:37 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-05 08:52:37 +0000 |
commit | 3f61db5756a866fb4ec6b09cacd0ccbce7410361 (patch) | |
tree | d369d267fc93dd2f4f997f191e4630af47e29402 /usr.sbin/ctld/ctld.c | |
parent | c060972cd4ad911e494f964ecbd92d6c4ffd0f10 (diff) | |
download | FreeBSD-src-3f61db5756a866fb4ec6b09cacd0ccbce7410361.zip FreeBSD-src-3f61db5756a866fb4ec6b09cacd0ccbce7410361.tar.gz |
MFC r287500: Allow LUN options modification via CTL_LUNREQ_MODIFY.
Not all changes take effect, but that is a different question.
Diffstat (limited to 'usr.sbin/ctld/ctld.c')
-rw-r--r-- | usr.sbin/ctld/ctld.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index dc33224..85f1133 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -1944,18 +1944,14 @@ conf_apply(struct conf *oldconf, struct conf *newconf) TAILQ_FOREACH_SAFE(newlun, &newconf->conf_luns, l_next, tmplun) { oldlun = lun_find(oldconf, newlun->l_name); if (oldlun != NULL) { - if (newlun->l_size != oldlun->l_size || - newlun->l_size == 0) { - log_debugx("resizing lun \"%s\", CTL lun %d", + log_debugx("modifying lun \"%s\", CTL lun %d", + newlun->l_name, newlun->l_ctl_lun); + error = kernel_lun_modify(newlun); + if (error != 0) { + log_warnx("failed to " + "modify lun \"%s\", CTL lun %d", newlun->l_name, newlun->l_ctl_lun); - error = kernel_lun_resize(newlun); - if (error != 0) { - log_warnx("failed to " - "resize lun \"%s\", CTL lun %d", - newlun->l_name, - newlun->l_ctl_lun); - cumulated_error++; - } + cumulated_error++; } continue; } |