From: Andy Grover Date: Tue, 31 Mar 2015 22:04:37 +0000 (-0700) Subject: target: Allow userspace to write 1 to attrib/emulate_fua_write X-Git-Tag: MMI-PSA29.97-13-9~10353^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86d65dc4fe74d5b3228fe13c5eff0b10ae6808eb;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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=1206184 Reported-by: Yanko Kaneti Reported-by: Juan Quintela Signed-off-by: Andy Grover Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 79b4ec3ca2db..7faa6aef9a4d 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -781,8 +781,8 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag) } if (flag && dev->transport->get_write_cache) { - pr_err("emulate_fua_write not supported for this device\n"); - return -EINVAL; + pr_warn("emulate_fua_write not supported for this device, ignoring\n"); + return 0; } if (dev->export_count) { pr_err("emulate_fua_write cannot be changed with active"