Merge tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block
Pull block layer updates from Jens Axboe: "It's a pretty quiet round this time, which is nice. This contains: - series from Bart, cleaning up the way we set/test/clear atomic queue flags. - series from Bart, fixing races between gendisk and queue registration and removal. - set of bcache fixes and improvements from various folks, by way of Michael Lyle. - set of lightnvm updates from Matias, most of it being the 1.2 to 2.0 transition. - removal of unused DIO flags from Nikolay. - blk-mq/sbitmap memory ordering fixes from Omar. - divide-by-zero fix for BFQ from Paolo. - minor documentation patches from Randy. - timeout fix from Tejun. - Alpha "can't write a char atomically" fix from Mikulas. - set of NVMe fixes by way of Keith. - bsg and bsg-lib improvements from Christoph. - a few sed-opal fixes from Jonas. - cdrom check-disk-change deadlock fix from Maurizio. - various little fixes, comment fixes, etc from various folks" * tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block: (139 commits) blk-mq: Directly schedule q->timeout_work when aborting a request blktrace: fix comment in blktrace_api.h lightnvm: remove function name in strings lightnvm: pblk: remove some unnecessary NULL checks lightnvm: pblk: don't recover unwritten lines lightnvm: pblk: implement 2.0 support lightnvm: pblk: implement get log report chunk lightnvm: pblk: rename ppaf* to addrf* lightnvm: pblk: check for supported version lightnvm: implement get log report chunk helpers lightnvm: make address conversions depend on generic device lightnvm: add support for 2.0 address format lightnvm: normalize geometry nomenclature lightnvm: complete geo structure with maxoc* lightnvm: add shorten OCSSD version in geo lightnvm: add minor version to generic geometry lightnvm: simplify geometry structure lightnvm: pblk: refactor init/exit sequences lightnvm: Avoid validation of default op value lightnvm: centralize permission check for lightnvm ioctl ...
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/inet.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <scsi/scsi_proto.h>
|
||||
#include <scsi/iscsi_proto.h>
|
||||
@@ -3291,30 +3292,6 @@ iscsit_send_task_mgt_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||
return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
static bool iscsit_check_inaddr_any(struct iscsi_np *np)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (np->np_sockaddr.ss_family == AF_INET6) {
|
||||
const struct sockaddr_in6 sin6 = {
|
||||
.sin6_addr = IN6ADDR_ANY_INIT };
|
||||
struct sockaddr_in6 *sock_in6 =
|
||||
(struct sockaddr_in6 *)&np->np_sockaddr;
|
||||
|
||||
if (!memcmp(sock_in6->sin6_addr.s6_addr,
|
||||
sin6.sin6_addr.s6_addr, 16))
|
||||
ret = true;
|
||||
} else {
|
||||
struct sockaddr_in * sock_in =
|
||||
(struct sockaddr_in *)&np->np_sockaddr;
|
||||
|
||||
if (sock_in->sin_addr.s_addr == htonl(INADDR_ANY))
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define SENDTARGETS_BUF_LIMIT 32768U
|
||||
|
||||
static int
|
||||
@@ -3393,7 +3370,6 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
|
||||
list_for_each_entry(tpg_np, &tpg->tpg_gnp_list,
|
||||
tpg_np_list) {
|
||||
struct iscsi_np *np = tpg_np->tpg_np;
|
||||
bool inaddr_any = iscsit_check_inaddr_any(np);
|
||||
struct sockaddr_storage *sockaddr;
|
||||
|
||||
if (np->np_network_transport != network_transport)
|
||||
@@ -3422,7 +3398,7 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
|
||||
}
|
||||
}
|
||||
|
||||
if (inaddr_any)
|
||||
if (inet_addr_is_any((struct sockaddr *)&np->np_sockaddr))
|
||||
sockaddr = &conn->local_sockaddr;
|
||||
else
|
||||
sockaddr = &np->np_sockaddr;
|
||||
|
@@ -309,7 +309,7 @@ static int tcm_loop_target_reset(struct scsi_cmnd *sc)
|
||||
|
||||
static int tcm_loop_slave_alloc(struct scsi_device *sd)
|
||||
{
|
||||
set_bit(QUEUE_FLAG_BIDI, &sd->request_queue->queue_flags);
|
||||
blk_queue_flag_set(QUEUE_FLAG_BIDI, sd->request_queue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user