Commit 86d65dc4 authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

target: Allow userspace to write 1 to attrib/emulate_fua_write

Before 4.0, reading attrib/emulate_fua_write has returned 1. Saved
configs created on a pre-4.0 kernel will try to write that back when
restoring LIO configuration. This should succeed with no effect,
and issue a warning.

See https://bugzilla.redhat.com/show_bug.cgi?id=1206184Reported-by: default avatarYanko Kaneti <yaneti@declera.com>
Reported-by: default avatarJuan Quintela <quintela@redhat.com>
Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 9bc6548f
...@@ -781,8 +781,8 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag) ...@@ -781,8 +781,8 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag)
} }
if (flag && if (flag &&
dev->transport->get_write_cache) { dev->transport->get_write_cache) {
pr_err("emulate_fua_write not supported for this device\n"); pr_warn("emulate_fua_write not supported for this device, ignoring\n");
return -EINVAL; return 0;
} }
if (dev->export_count) { if (dev->export_count) {
pr_err("emulate_fua_write cannot be changed with active" pr_err("emulate_fua_write cannot be changed with active"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment