summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/ctld.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-09-06 11:23:01 +0000
committermav <mav@FreeBSD.org>2015-09-06 11:23:01 +0000
commit037d401b2cc0aedcccedd18c4119c443e8f53487 (patch)
tree8b54d771eecaf8fedb30f1e2325cab5e9c61f640 /usr.sbin/ctld/ctld.c
parent8165ddaa74b615872c882871152b9924d5f57ea5 (diff)
downloadFreeBSD-src-037d401b2cc0aedcccedd18c4119c443e8f53487.zip
FreeBSD-src-037d401b2cc0aedcccedd18c4119c443e8f53487.tar.gz
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.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
index 6f0c63b..f146ee6 100644
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -1961,18 +1961,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;
}
OpenPOWER on IntegriCloud