From 0fa4ce92309b72890a41ac7b716fe414879359e1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 20 Aug 2016 04:00:46 +0000 Subject: [PATCH 1/7] nightly build: Update kernel versions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6965 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- nightly/conf/nightly.conf | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 14b7649df..fc71c17c8 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,29 +3,32 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -4.4.1 \ -4.3.5-nc \ +4.7.1 \ +4.6.7-nc \ +4.5.7-nc \ +4.4.18-nc \ +4.3.6-nc \ 4.2.8-nc \ -4.1.17-nc \ +4.1.30-nc \ 4.0.9-nc \ 3.19.8-nc \ -3.18.26-nc \ +3.18.39-nc \ 3.17.8-nc \ -3.16.7-nc \ +3.16.36-nc \ 3.15.10-nc \ -3.14.60-nc \ +3.14.76-nc \ 3.13.11-nc \ -3.12.53-nc \ +3.12.62-nc \ 3.11.10-nc \ -3.10.96-nc \ +3.10.102-nc \ 3.9.11-nc \ 3.8.13-nc \ 3.7.10-nc \ 3.6.11-nc \ 3.5.7-nc \ -3.4.110-nc \ +3.4.112-nc \ 3.3.8-nc \ -3.2.76-nc \ +3.2.81-nc \ 3.1.10-nc \ 3.0.101-nc \ 2.6.39.4-nc \ From 7f9c69ae21c2c4da7f3e068de4319f856d46f0a1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Aug 2016 22:57:51 +0000 Subject: [PATCH 2/7] isert-scst: Address checkpatch coding style complaints This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6967 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_rdma.c | 91 ++++++++++++---------- iscsi-scst/kernel/isert-scst/isert.c | 16 ++-- iscsi-scst/kernel/isert-scst/isert_login.c | 22 +++--- 3 files changed, 69 insertions(+), 60 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 9a48679a2..5796f3c85 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -142,9 +142,9 @@ int isert_post_send(struct isert_connection *isert_conn, return err; } -static void isert_post_drain_sq(struct isert_connection* isert_conn) +static void isert_post_drain_sq(struct isert_connection *isert_conn) { - struct ib_send_wr* bad_wr; + struct ib_send_wr *bad_wr; struct isert_wr *drain_wr_sq = &isert_conn->drain_wr_sq; int err; @@ -163,12 +163,13 @@ static void isert_post_drain_sq(struct isert_connection* isert_conn) #endif if (unlikely(err)) { PRINT_ERROR("Failed to post drain wr to send queue, err:%d", err); - /* We need to decrement iser_conn->kref in order to be able to cleanup - * the connection */ + /* + * We need to decrement iser_conn->kref in order to be able to + * clean up the connection. + */ set_bit(ISERT_DRAINED_SQ, &isert_conn->flags); - if (test_bit(ISERT_DRAINED_RQ, &isert_conn->flags)) { + if (test_bit(ISERT_DRAINED_RQ, &isert_conn->flags)) isert_sched_conn_free(isert_conn); - } } } @@ -184,11 +185,11 @@ static void isert_post_drain_rq(struct isert_connection *isert_conn) err = ib_post_recv(isert_conn->qp, &drain_wr_rq->recv_wr, &bad_wr); if (unlikely(err)) { - PRINT_ERROR("Failed to post drain wr to receive queue, err:%d", err); + PRINT_ERROR("Failed to post drain wr to receive queue, err:%d", + err); set_bit(ISERT_DRAINED_RQ, &isert_conn->flags); - if (test_bit(ISERT_DRAINED_SQ, &isert_conn->flags)) { + if (test_bit(ISERT_DRAINED_SQ, &isert_conn->flags)) isert_sched_conn_free(isert_conn); - } } } @@ -356,8 +357,8 @@ static void isert_recv_completion_handler(struct isert_wr *wr) ISER_HDRS_SZ, DMA_FROM_DEVICE); isert_rx_pdu_parse_headers(pdu); - isert_dma_sync_data_for_cpu(ib_dev, sge, - pdu->iscsi.pdu.datasize + pdu->iscsi.pdu.ahssize); + isert_dma_sync_data_for_cpu(ib_dev, sge, pdu->iscsi.pdu.datasize + + pdu->iscsi.pdu.ahssize); switch (pdu->isert_opcode) { case ISER_ISCSI_CTRL: @@ -710,12 +711,11 @@ static void isert_handle_wc_error(struct ib_wc *wc) #endif if (unlikely(num_sge == 0)) { /* Drain WR */ set_bit(ISERT_DRAINED_SQ, &isert_conn->flags); - if (test_bit(ISERT_DRAINED_RQ, &isert_conn->flags)) { + if (test_bit(ISERT_DRAINED_RQ, &isert_conn->flags)) isert_sched_conn_drained(isert_conn); - } - } - else if (!isert_pdu->is_fake_rx) + } else if (!isert_pdu->is_fake_rx) { isert_pdu_err(&isert_pdu->iscsi); + } break; case ISER_WR_RDMA_READ: if (isert_buf->sg_cnt != 0) { @@ -731,15 +731,14 @@ static void isert_handle_wc_error(struct ib_wc *wc) num_sge = wr->recv_wr.num_sge; if (unlikely(num_sge == 0)) { /* Drain WR */ set_bit(ISERT_DRAINED_RQ, &isert_conn->flags); - if (test_bit(ISERT_DRAINED_SQ, &isert_conn->flags)) { + if (test_bit(ISERT_DRAINED_SQ, &isert_conn->flags)) isert_sched_conn_drained(isert_conn); - } } break; case ISER_WR_RDMA_WRITE: if (isert_buf->sg_cnt != 0) { - ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, - isert_buf->dma_dir); + ib_dma_unmap_sg(ib_dev, isert_buf->sg, + isert_buf->sg_cnt, isert_buf->dma_dir); isert_buf->sg_cnt = 0; } /* @@ -988,7 +987,8 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) goto free_isert_dev; } - isert_dev->cq_desc = vmalloc(sizeof(*isert_dev->cq_desc) * isert_dev->num_cqs); + isert_dev->cq_desc = vmalloc(sizeof(*isert_dev->cq_desc) * + isert_dev->num_cqs); if (unlikely(isert_dev->cq_desc == NULL)) { PRINT_ERROR("Failed to allocate %ld bytes for iser cq_desc", sizeof(*isert_dev->cq_desc) * isert_dev->num_cqs); @@ -1074,14 +1074,17 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) if (unlikely(IS_ERR(cq))) { cq_desc->cq = NULL; err = PTR_ERR(cq); - PRINT_ERROR("Failed to create iser dev cq, err:%d", err); + PRINT_ERROR("Failed to create iser dev cq, err:%d", + err); goto fail_cq; } cq_desc->cq = cq; - err = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS); + err = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP | + IB_CQ_REPORT_MISSED_EVENTS); if (unlikely(err)) { - PRINT_ERROR("Failed to request notify cq, err: %d", err); + PRINT_ERROR("Failed to request notify cq, err: %d", + err); goto fail_cq; } } @@ -1303,7 +1306,8 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id, err = isert_post_recv(isert_conn, &isert_conn->login_req_pdu->wr[0], 1); if (unlikely(err)) { - PRINT_ERROR("Failed to post recv login req rx buf, err:%d", err); + PRINT_ERROR("Failed to post recv login req rx buf, err:%d", + err); goto fail_post_recv; } @@ -1340,9 +1344,8 @@ static void isert_deref_device(struct isert_device *isert_dev) static void isert_kref_free(struct kref *kref) { struct isert_conn_dev *dev; - struct isert_connection *isert_conn = container_of(kref, - struct isert_connection, - kref); + struct isert_connection *isert_conn = + container_of(kref, struct isert_connection, kref); struct isert_device *isert_dev = isert_conn->isert_dev; struct isert_cq *cq = isert_conn->qp->recv_cq->cq_context; @@ -1390,15 +1393,16 @@ void isert_conn_free(struct isert_connection *isert_conn) } static int isert_cm_disconnected_handler(struct rdma_cm_id *cm_id, - struct rdma_cm_event *event) + struct rdma_cm_event *event) { struct isert_connection *isert_conn = cm_id->qp->qp_context; + if (!test_and_set_bit(ISERT_CONNECTION_CLOSE, &isert_conn->flags)) isert_sched_conn_closed(isert_conn); return 0; } -static void isert_immediate_conn_close(struct isert_connection* isert_conn) +static void isert_immediate_conn_close(struct isert_connection *isert_conn) { set_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags); set_bit(ISERT_CONNECTION_CLOSE, &isert_conn->flags); @@ -1472,9 +1476,11 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id, tgt_conn_param.rnr_retry_count = ini_conn_param->rnr_retry_count; - tgt_conn_param.initiator_depth = isert_dev->device_attr.max_qp_init_rd_atom; + tgt_conn_param.initiator_depth = + isert_dev->device_attr.max_qp_init_rd_atom; if (tgt_conn_param.initiator_depth > ini_conn_param->initiator_depth) - tgt_conn_param.initiator_depth = ini_conn_param->initiator_depth; + tgt_conn_param.initiator_depth = + ini_conn_param->initiator_depth; tgt_conn_param.private_data_len = sizeof(cm_hdr); tgt_conn_param.private_data = &cm_hdr; @@ -1485,7 +1491,8 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id, err = rdma_accept(cm_id, &tgt_conn_param); if (unlikely(err)) { - PRINT_ERROR("Failed to accept conn request, err:%d conn:%p", err, isert_conn); + PRINT_ERROR("Failed to accept conn request, err:%d conn:%p", + err, isert_conn); goto fail_accept; } @@ -1570,9 +1577,8 @@ static int isert_cm_connect_handler(struct rdma_cm_id *cm_id, ret = isert_conn_established(&isert_conn->iscsi, (struct sockaddr *)&isert_conn->peer_addr, isert_conn->peer_addrsz); - if (unlikely(ret)) { + if (unlikely(ret)) goto out; - } if (push_saved_pdu) { PRINT_INFO("iser push saved rx pdu"); @@ -1727,12 +1733,12 @@ static int isert_cm_evt_handler(struct rdma_cm_id *cm_id, /* We can receive this instead of RDMA_CM_EVENT_ESTABLISHED */ case RDMA_CM_EVENT_UNREACHABLE: { - struct isert_connection *isert_conn = cm_id->qp->qp_context; + struct isert_connection *isert_conn = + cm_id->qp->qp_context; mutex_lock(&isert_conn->state_mutex); - if (isert_conn->state != ISER_CONN_CLOSING) { + if (isert_conn->state != ISER_CONN_CLOSING) isert_immediate_conn_close(isert_conn); - } mutex_unlock(&isert_conn->state_mutex); err = 0; } @@ -1837,8 +1843,8 @@ int isert_portal_listen(struct isert_portal *portal, NIPQUAD(((struct sockaddr_in *)sa)->sin_addr.s_addr), (int)ntohs(((struct sockaddr_in *)sa)->sin_port)); #else - PRINT_INFO("iser portal cm_id:%p listens on: " - "%pI4:%d", portal->cm_id, + PRINT_INFO("iser portal cm_id:%p listens on: %pI4:%d", + portal->cm_id, &((struct sockaddr_in *)sa)->sin_addr.s_addr, (int)ntohs(((struct sockaddr_in *)sa)->sin_port)); #endif @@ -1851,8 +1857,8 @@ int isert_portal_listen(struct isert_portal *portal, NIP6(((struct sockaddr_in6 *)sa)->sin6_addr), (int)ntohs(((struct sockaddr_in6 *)sa)->sin6_port)); #else - PRINT_INFO("iser portal cm_id:%p listens on: " - "%pI6 %d", portal->cm_id, + PRINT_INFO("iser portal cm_id:%p listens on: %pI6 %d", + portal->cm_id, &((struct sockaddr_in6 *)sa)->sin6_addr, (int)ntohs(((struct sockaddr_in6 *)sa)->sin6_port)); #endif @@ -1902,9 +1908,8 @@ void isert_portal_release(struct isert_portal *portal) isert_portal_free(portal); mutex_unlock(&dev_list_mutex); - while (portal->refcnt > 0) { + while (portal->refcnt > 0) msleep(100); - } PRINT_INFO("done releasing portal %p", portal); } diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 4d51073f8..8d347dc4c 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -205,8 +205,8 @@ static void isert_cmnd_free(struct iscsi_cmnd *cmnd) if (unlikely(cmnd->on_write_list || cmnd->on_write_timeout_list)) { struct iscsi_scsi_cmd_hdr *req = cmnd_hdr(cmnd); - PRINT_CRIT_ERROR("cmnd %p still on some list?, %x, %x, %x, " - "%x, %x, %x, %x", cmnd, req->opcode, req->scb[0], + PRINT_CRIT_ERROR("cmnd %p still on some list?, %x, %x, %x, %x, %x, %x, %x", + cmnd, req->opcode, req->scb[0], req->flags, req->itt, be32_to_cpu(req->data_length), req->cmd_sn, be32_to_cpu((__force __be32)(cmnd->pdu.datasize))); @@ -394,17 +394,17 @@ int isert_pdu_sent(struct iscsi_cmnd *pdu) if (unlikely(pdu->should_close_conn)) { if (pdu->should_close_all_conn) { - struct iscsi_target *target = pdu->conn->session->target; + struct iscsi_target *target = + pdu->conn->session->target; - PRINT_INFO("Closing all connections for target %x at " - "initiator's %s request", target->tid, - conn->session->initiator_name); + PRINT_INFO("Closing all connections for target %x at initiator's %s request", + target->tid, conn->session->initiator_name); mutex_lock(&target->target_mutex); target_del_all_sess(target, 0); mutex_unlock(&target->target_mutex); } else { - PRINT_INFO("Closing connection %p at initiator's %s " - "request", conn, conn->session->initiator_name); + PRINT_INFO("Closing connection %p at initiator's %s request", + conn, conn->session->initiator_name); mark_conn_closed(conn); } } diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index c43193bc4..3921728f1 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -77,7 +77,8 @@ static struct isert_conn_dev *get_available_dev(struct isert_listener_dev *dev, res->occupied = 1; res->conn = conn; isert_set_priv(conn, res); - list_add_tail(&res->conn_list_entry, &dev->new_conn_list); + list_add_tail(&res->conn_list_entry, + &dev->new_conn_list); break; } } @@ -446,9 +447,9 @@ int isert_conn_established(struct iscsi_conn *iscsi_conn, return add_new_connection(&isert_listen_dev, iscsi_conn); } -static void isert_dev_disconnect(struct iscsi_conn* iscsi_conn) +static void isert_dev_disconnect(struct iscsi_conn *iscsi_conn) { - struct isert_conn_dev* dev = isert_get_priv(iscsi_conn); + struct isert_conn_dev *dev = isert_get_priv(iscsi_conn); if (dev) { isert_del_timer(dev); @@ -486,14 +487,16 @@ void isert_connection_closed(struct iscsi_conn *iscsi_conn) void isert_connection_abort(struct iscsi_conn *iscsi_conn) { - struct isert_connection *isert_conn = (struct isert_connection *)iscsi_conn; + struct isert_connection *isert_conn = + (struct isert_connection *)iscsi_conn; TRACE_ENTRY(); mutex_lock(&conn_mgmt_mutex); if (!iscsi_conn->rd_state) { - if (!test_and_set_bit(ISERT_DISCON_CALLED, &isert_conn->flags)) { + if (!test_and_set_bit(ISERT_DISCON_CALLED, + &isert_conn->flags)) { isert_dev_disconnect(iscsi_conn); isert_free_connection(iscsi_conn); } @@ -721,7 +724,7 @@ static ssize_t isert_write(struct file *filp, const char __user *buf, static bool is_last_login_rsp(struct iscsi_login_rsp_hdr *rsp) { return (rsp->flags & ISCSI_FLG_TRANSIT) && - ((rsp->flags & ISCSI_FLG_NSG_MASK) == ISCSI_FLG_NSG_FULL_FEATURE); + (rsp->flags & ISCSI_FLG_NSG_MASK) == ISCSI_FLG_NSG_FULL_FEATURE; } static long isert_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) @@ -771,7 +774,8 @@ static long isert_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) } dev->state = CS_RSP_FINISHED; - rsp = (struct iscsi_login_rsp_hdr *)(&dev->login_rsp->pdu.bhs); + rsp = (struct iscsi_login_rsp_hdr *) + &dev->login_rsp->pdu.bhs; last = is_last_login_rsp(rsp); dev->login_rsp->bufflen -= dev->write_len; @@ -795,8 +799,8 @@ static long isert_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) struct isert_addr_info addr; res = isert_get_target_addr(dev->conn, - (struct sockaddr *)&addr.addr, - &addr.addr_len); + (struct sockaddr *)&addr.addr, + &addr.addr_len); if (unlikely(res)) goto out; From 25d4ff90ebc86b6b009d5595fced7acfae64e64e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Aug 2016 22:58:24 +0000 Subject: [PATCH 3/7] scst_vdisk: Use tabs instead of spaces for indentation git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6968 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 24d970669..592cc611e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3822,7 +3822,7 @@ static int vdisk_unmap_range(struct scst_cmd *cmd, err = blkdev_issue_discard(inode->i_bdev, start_sector, nr_sects, gfp); #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) \ && !(LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 34) \ - && defined(CONFIG_SUSE_KERNEL)) + && defined(CONFIG_SUSE_KERNEL)) err = blkdev_issue_discard(inode->i_bdev, start_sector, nr_sects, gfp, DISCARD_FL_WAIT); #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) From 89e278e2d6156a6d6ae0931d1a488111e7ba3057 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Aug 2016 22:58:45 +0000 Subject: [PATCH 4/7] ib_srpt: Remove trailing whitespace git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6969 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 40a510349..18276851b 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -4095,7 +4095,7 @@ static ssize_t show_port_id(struct kobject *kobj, struct kobj_attribute *attr, strcmp(sport->port_id, DEFAULT_SRPT_ID_STRING) ? SCST_SYSFS_KEY_MARK "\n" : ""); mutex_unlock(&sport->mutex); - + res = strlen(buf); out: @@ -4113,7 +4113,7 @@ static ssize_t store_port_id(struct kobject *kobj, struct kobj_attribute *attr, if (!sport) goto out; - + end = buf + count; while (end > buf && isspace(((unsigned char *)end)[-1])) --end; From f221a515e20aace8fa75a812eaa6c90662ef4e73 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Aug 2016 22:59:16 +0000 Subject: [PATCH 5/7] ib_srpt: Address a checkpatch complaint about a missing space git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6970 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 71f6319b8..4dea3fbfb 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -49,7 +49,7 @@ #include #endif #if defined(RHEL_MAJOR) && RHEL_MAJOR -0 == 5 -#define vlan_dev_vlan_id(dev) (panic("RHEL 5 misses vlan_dev_vlan_id()"),0) +#define vlan_dev_vlan_id(dev) (panic("RHEL 5 misses vlan_dev_vlan_id()"), 0) #endif #if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 6 #define __ethtool_get_settings(dev, cmd) (panic("RHEL misses __ethtool_get_settings()"), 0) From 12a8edb9d463de09c8d43726115d4ea4600fba79 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Aug 2016 23:16:56 +0000 Subject: [PATCH 6/7] scst_vdisk: Comment out a local variable that is not used git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6971 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 592cc611e..0db59f714 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -2294,6 +2294,7 @@ static const struct scst_opcode_descriptor scst_op_descr_format_unit = { .od_cdb_usage_bits = { FORMAT_UNIT, 0xF0, 0, 0, 0, SCST_OD_DEFAULT_CONTROL_BYTE }, }; +#if 0 static const struct scst_opcode_descriptor scst_op_descr_get_lba_status = { .od_opcode = SERVICE_ACTION_IN_16, .od_serv_action = SAI_GET_LBA_STATUS, @@ -2307,6 +2308,7 @@ static const struct scst_opcode_descriptor scst_op_descr_get_lba_status = { 0xFF, 0xFF, 0xFF, 0xFF, 0, SCST_OD_DEFAULT_CONTROL_BYTE }, }; +#endif static const struct scst_opcode_descriptor scst_op_descr_allow_medium_removal = { .od_opcode = ALLOW_MEDIUM_REMOVAL, From 3f35afdf88f3fb6ff99a8fb18aabc12fc7a5b378 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 22 Aug 2016 00:04:58 +0000 Subject: [PATCH 7/7] isert-scst: Convert a cast into a container_of() expression This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6972 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/isert_login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index 3921728f1..428dd3268 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -488,7 +488,7 @@ void isert_connection_closed(struct iscsi_conn *iscsi_conn) void isert_connection_abort(struct iscsi_conn *iscsi_conn) { struct isert_connection *isert_conn = - (struct isert_connection *)iscsi_conn; + container_of(iscsi_conn, struct isert_connection, iscsi); TRACE_ENTRY();