Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger: "Just a few small fixes: Two from Andy, the first addresses a v4.0 target specific regression to a user visible configfs attribute, and the second adds a set of missing brackets around IPv6 discovery portal information within iscsi-target. And one from Mike that fixes an OOPs regression in traditional iscsi-target when an iovec allocation fails, that has been present since v3.10.y code. (CC'd to stable)" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi target: fix oops when adding reject pdu iscsi-target: TargetAddress in SendTargets should bracket ipv6 addresses target: Allow userspace to write 1 to attrib/emulate_fua_write
This commit is contained in:
Коммит
49850a147c
|
@ -1181,7 +1181,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
||||||
* traditional iSCSI block I/O.
|
* traditional iSCSI block I/O.
|
||||||
*/
|
*/
|
||||||
if (iscsit_allocate_iovecs(cmd) < 0) {
|
if (iscsit_allocate_iovecs(cmd) < 0) {
|
||||||
return iscsit_add_reject_cmd(cmd,
|
return iscsit_reject_cmd(cmd,
|
||||||
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
||||||
}
|
}
|
||||||
immed_data = cmd->immediate_data;
|
immed_data = cmd->immediate_data;
|
||||||
|
@ -3468,6 +3468,7 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
|
||||||
tpg_np_list) {
|
tpg_np_list) {
|
||||||
struct iscsi_np *np = tpg_np->tpg_np;
|
struct iscsi_np *np = tpg_np->tpg_np;
|
||||||
bool inaddr_any = iscsit_check_inaddr_any(np);
|
bool inaddr_any = iscsit_check_inaddr_any(np);
|
||||||
|
char *fmt_str;
|
||||||
|
|
||||||
if (np->np_network_transport != network_transport)
|
if (np->np_network_transport != network_transport)
|
||||||
continue;
|
continue;
|
||||||
|
@ -3495,8 +3496,12 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
len = sprintf(buf, "TargetAddress="
|
if (np->np_sockaddr.ss_family == AF_INET6)
|
||||||
"%s:%hu,%hu",
|
fmt_str = "TargetAddress=[%s]:%hu,%hu";
|
||||||
|
else
|
||||||
|
fmt_str = "TargetAddress=%s:%hu,%hu";
|
||||||
|
|
||||||
|
len = sprintf(buf, fmt_str,
|
||||||
inaddr_any ? conn->local_ip : np->np_ip,
|
inaddr_any ? conn->local_ip : np->np_ip,
|
||||||
np->np_port,
|
np->np_port,
|
||||||
tpg->tpgt);
|
tpg->tpgt);
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче