From e8f0d9af09a9dbe52c464728756ced910d1272d5 Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Wed, 27 Aug 2014 13:49:04 +0000 Subject: [PATCH] Merged revisions 5671,5687-5697,5723 via svnmerge from svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ................ r5671 | bvassche | 2014-07-10 09:27:29 +0300 (Thu, 10 Jul 2014) | 1 line scst: Create /var/lib/scst/pr and /var/lib/scst/vdev_mode_pages during installation (merge r5669 and r5670 from trunk) ................ r5687 | bvassche | 2014-07-20 08:59:31 +0300 (Sun, 20 Jul 2014) | 1 line iscsi-scst: Handle data buffers with non-zero offset correctly (merge r5683 from trunk) ................ r5688 | bvassche | 2014-07-20 09:01:49 +0300 (Sun, 20 Jul 2014) | 1 line Makefile: Only report which RPMs have been built if "make rpm" is run as a non-privileged user (merge r5560 from trunk) ................ r5689 | bvassche | 2014-07-20 09:03:55 +0300 (Sun, 20 Jul 2014) | 1 line fcst: Remove an unused variable (merge r5605 from trunk) ................ r5690 | bvassche | 2014-07-20 09:04:43 +0300 (Sun, 20 Jul 2014) | 1 line fcst: Move exch_done() calls into ft_cmd_done() (merge r5606 from trunk) ................ r5691 | bvassche | 2014-07-20 09:05:27 +0300 (Sun, 20 Jul 2014) | 1 line fcst: Handle frame send failures properly (merge r5607 from trunk) ................ r5692 | bvassche | 2014-07-20 09:07:57 +0300 (Sun, 20 Jul 2014) | 1 line qla2x00t: Documentation / source code comment / log messages spelling fix (merge r5555 from trunk) ................ r5693 | bvassche | 2014-07-20 09:46:28 +0300 (Sun, 20 Jul 2014) | 1 line scst: Make lockdep_assert_held() easier to use (merge r5573 from trunk) ................ r5694 | bvassche | 2014-07-20 09:47:58 +0300 (Sun, 20 Jul 2014) | 1 line scst: Leave out FSF mail address (merge r5572 from trunk) ................ r5695 | bvassche | 2014-07-20 09:52:12 +0300 (Sun, 20 Jul 2014) | 1 line Change BUG_ON(1) into BUG() (merge r5618 from trunk) ................ r5696 | bvassche | 2014-07-20 09:54:00 +0300 (Sun, 20 Jul 2014) | 1 line iscsi-scst: Suppress a compiler warning (merge r5614 from trunk) ................ r5697 | bvassche | 2014-07-20 10:03:04 +0300 (Sun, 20 Jul 2014) | 1 line scst/include/scst.h: Define lockdep_assert_held() only once (follow-up for r5693) ................ r5723 | vlnb | 2014-08-21 08:21:55 +0300 (Thu, 21 Aug 2014) | 11 lines Merged revisions 5721 via svnmerge from svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk ........ r5721 | vlnb | 2014-08-20 22:17:47 -0700 (Wed, 20 Aug 2014) | 5 lines Fix incorrect address computation during receive PDUs preparations Found and fix suggested by Кирилл Тюшев ........ ................ git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5739 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 8 ++- fcst/fcst.h | 22 ++++++ fcst/ft_cmd.c | 86 ++++++++++++++++-------- fcst/ft_io.c | 16 +++-- fcst/ft_sess.c | 2 - iscsi-scst/COPYING | 4 +- iscsi-scst/kernel/config.c | 2 - iscsi-scst/kernel/conn.c | 12 ---- iscsi-scst/kernel/iscsi.c | 11 ++- iscsi-scst/kernel/isert-scst/iser_rdma.c | 6 +- iscsi-scst/kernel/nthread.c | 14 +++- iscsi-scst/kernel/param.c | 4 -- iscsi-scst/kernel/session.c | 16 ----- iscsi-scst/kernel/target.c | 14 ---- iscsi-scst/resource_agents/SCSTLun | 3 +- iscsi-scst/resource_agents/SCSTTarget | 3 +- iscsi-scst/usr/chap.c | 3 +- iscsi-scst/usr/isns.c | 4 +- iscsi-scst/usr/isns_proto.h | 4 +- mvsas_tgt/mv_64xx.c | 4 +- mvsas_tgt/mv_64xx.h | 4 +- mvsas_tgt/mv_94xx.c | 4 +- mvsas_tgt/mv_94xx.h | 4 +- mvsas_tgt/mv_chips.h | 4 +- mvsas_tgt/mv_defs.h | 4 +- mvsas_tgt/mv_init.c | 6 +- mvsas_tgt/mv_sas.c | 4 +- mvsas_tgt/mv_sas.h | 4 +- mvsas_tgt/mv_spi.c | 4 +- mvsas_tgt/mv_spi.h | 4 +- mvsas_tgt/mv_tgt.c | 6 +- mvsas_tgt/mv_tgt.h | 4 +- qla2x00t/qla2x00-target/README | 4 +- qla2x00t/qla2x00-target/qla2x00t.c | 14 ++-- qla2x00t/qla_attr.c | 4 +- qla_isp/LICENSE | 3 +- qla_isp/common/isp.c | 3 +- qla_isp/common/isp_library.c | 3 +- qla_isp/common/isp_library.h | 3 +- qla_isp/common/isp_stds.h | 3 +- qla_isp/common/isp_target.c | 3 +- qla_isp/common/isp_target.h | 3 +- qla_isp/common/isp_tpublic.h | 3 +- qla_isp/common/ispmbox.h | 3 +- qla_isp/common/ispreg.h | 3 +- qla_isp/common/ispvar.h | 3 +- qla_isp/firmware/fwbin | 3 +- qla_isp/linux-2.6/Makefile | 3 +- qla_isp/linux-2.6/build/Makefile | 3 +- qla_isp/linux/isp_cb_ops.c | 3 +- qla_isp/linux/isp_ioctl.h | 3 +- qla_isp/linux/isp_linux.c | 3 +- qla_isp/linux/isp_linux.h | 3 +- qla_isp/linux/isp_pci.c | 3 +- qla_isp/linux/isp_scst.c | 3 +- scst.spec.in | 3 +- scst/COPYING | 4 +- scst/include/scst_debug.h | 2 + scst/src/Makefile | 1 + scst/src/dev_handlers/scst_user.c | 2 +- scst/src/dev_handlers/scst_vdisk.c | 14 +--- scst/src/scst_lib.c | 6 +- scst/src/scst_main.c | 2 - scst/src/scst_priv.h | 2 - scst/src/scst_targ.c | 4 +- scst/src/scst_tg.c | 46 ------------- scstadmin/LICENSE | 4 +- 67 files changed, 179 insertions(+), 283 deletions(-) diff --git a/Makefile b/Makefile index 3e3637749..c85d9f619 100644 --- a/Makefile +++ b/Makefile @@ -402,9 +402,11 @@ scst-rpm: rpm: $(MAKE) scst-rpm $(MAKE) -C scstadmin rpm - @echo - @echo "The following RPMs have been built:" - @find -name '*.rpm' + @if [ "$$(id -u)" != 0 ]; then \ + echo; \ + echo "The following RPMs have been built:"; \ + find -name '*.rpm'; \ + fi 2perf: extraclean cd $(SCST_DIR) && $(MAKE) $@ diff --git a/fcst/fcst.h b/fcst/fcst.h index 5d3027514..50f25b4a5 100644 --- a/fcst/fcst.h +++ b/fcst/fcst.h @@ -174,4 +174,26 @@ struct ft_tpg *ft_lport_find_tpg(struct fc_lport *); struct ft_node_acl *ft_acl_get(struct ft_tpg *, struct fc_rport_priv *); void ft_cmd_dump(struct scst_cmd *, const char *); +/* #define FCST_INJECT_SEND_ERRORS 2 */ + +#ifdef FCST_INJECT_SEND_ERRORS +#define FCST_INJ_SEND_ERR(e) \ +({ \ + int _error = 0; \ + \ + if (scst_random() % 62929 == 0) \ + _error = -ENOMEM; \ + if (FCST_INJECT_SEND_ERRORS >= 2 && scst_random() % 69491 == 0) \ + _error = -ENXIO; \ + if (_error) \ + pr_warn("%s: injected seq_send() error %d\n", __func__, \ + _error); \ + else \ + _error = (e); \ + _error; \ +}) +#else +#define FCST_INJ_SEND_ERR(e) (e) +#endif + #endif /* __SCSI_FCST_H__ */ diff --git a/fcst/ft_cmd.c b/fcst/ft_cmd.c index aeb9241d8..8c3509a78 100644 --- a/fcst/ft_cmd.c +++ b/fcst/ft_cmd.c @@ -212,13 +212,10 @@ static void ft_abort_cmd(struct scst_cmd *cmd) struct ft_cmd *fcmd = scst_cmd_get_tgt_priv(cmd); struct fc_seq *sp = fcmd->seq; struct fc_exch *ep = fc_seq_exch(sp); - struct fc_lport *lport = ep->lp; pr_err("%s: cmd %p ox_id %#x rx_id %#x state %d\n", __func__, cmd, ep->oxid, ep->rxid, fcmd->state); - lport->tt.exch_done(sp); - spin_lock(&fcmd->lock); switch (fcmd->state) { case FT_STATE_NEW: @@ -257,10 +254,13 @@ static void ft_abort_cmd(struct scst_cmd *cmd) static void ft_cmd_done(struct ft_cmd *fcmd) { struct fc_frame *fp = fcmd->req_frame; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) - struct fc_lport *lport; + struct fc_seq *sp = fcmd->seq; + struct fc_lport *lport = fr_dev(fp); - lport = fr_dev(fp); + if (sp) + lport->tt.exch_done(sp); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) if (fr_seq(fp)) lport->tt.seq_release(fr_seq(fp)); #endif @@ -291,6 +291,7 @@ int ft_send_response(struct scst_cmd *cmd) struct fc_exch *ep; unsigned int slen; size_t len; + enum ft_cmd_state prev_state; int resid = 0; int bi_resid = 0; int error; @@ -303,7 +304,7 @@ int ft_send_response(struct scst_cmd *cmd) lport = ep->lp; WARN_ON(fcmd->state != FT_STATE_NEW && fcmd->state != FT_STATE_DATA_IN); - ft_set_cmd_state(fcmd, FT_STATE_CMD_RSP_SENT); + prev_state = ft_set_cmd_state(fcmd, FT_STATE_CMD_RSP_SENT); if (scst_cmd_aborted_on_xmit(cmd)) { FT_IO_DBG("cmd aborted did %x oxid %x\n", ep->did, ep->oxid); @@ -313,7 +314,8 @@ int ft_send_response(struct scst_cmd *cmd) if (!scst_cmd_get_is_send_status(cmd)) { FT_IO_DBG("send status not set. feature not implemented\n"); - return SCST_TGT_RES_FATAL_ERROR; + error = SCST_TGT_RES_FATAL_ERROR; + goto err; } status = scst_cmd_get_status(cmd); @@ -333,7 +335,7 @@ int ft_send_response(struct scst_cmd *cmd) error = ft_send_read_data(cmd); if (error) { FT_ERR("ft_send_read_data returned %d\n", error); - return error; + goto err; } if (dir == SCST_DATA_BIDI) { @@ -347,8 +349,10 @@ int ft_send_response(struct scst_cmd *cmd) } fp = fc_frame_alloc(lport, len); - if (!fp) - return SCST_TGT_RES_QUEUE_FULL; + if (!fp) { + error = SCST_TGT_RES_QUEUE_FULL; + goto err; + } fcp = fc_frame_payload_get(fp, len); memset(fcp, 0, sizeof(*fcp)); @@ -384,14 +388,26 @@ int ft_send_response(struct scst_cmd *cmd) fc_fill_fc_hdr(fp, FC_RCTL_DD_CMD_STATUS, ep->did, ep->sid, FC_TYPE_FCP, FC_FC_EX_CTX | FC_FC_LAST_SEQ | FC_FC_END_SEQ, 0); - error = lport->tt.seq_send(lport, fcmd->seq, fp); - if (error < 0) + error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq, fp)); + if (error < 0) { pr_err("Sending response for exchange with OX_ID %#x and RX_ID" " %#x failed: %d\n", ep->oxid, ep->rxid, error); + error = error == -ENOMEM ? SCST_TGT_RES_QUEUE_FULL : + SCST_TGT_RES_FATAL_ERROR; + goto err; + } done: - lport->tt.exch_done(fcmd->seq); scst_tgt_cmd_done(cmd, SCST_CONTEXT_SAME); return SCST_TGT_RES_SUCCESS; + +err: + ft_set_cmd_state(fcmd, prev_state); + WARN_ONCE(error != SCST_TGT_RES_QUEUE_FULL && + error != SCST_TGT_RES_FATAL_ERROR, + "%s: invalid error code %d\n", + __func__, error); + return error; + } /* @@ -452,6 +468,7 @@ int ft_send_xfer_rdy(struct scst_cmd *cmd) struct fcp_txrdy *txrdy; struct fc_lport *lport; struct fc_exch *ep; + int error; fcmd = scst_cmd_get_tgt_priv(cmd); @@ -472,8 +489,17 @@ int ft_send_xfer_rdy(struct scst_cmd *cmd) fcmd->seq = lport->tt.seq_start_next(fcmd->seq); fc_fill_fc_hdr(fp, FC_RCTL_DD_DATA_DESC, ep->did, ep->sid, FC_TYPE_FCP, FC_FC_EX_CTX | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); - lport->tt.seq_send(lport, fcmd->seq, fp); - return SCST_TGT_RES_SUCCESS; + error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq, fp)); + switch (error) { + case 0: + return SCST_TGT_RES_SUCCESS; + case -ENOMEM: + ft_set_cmd_state(fcmd, FT_STATE_NEW); + return SCST_TGT_RES_QUEUE_FULL; + default: + ft_set_cmd_state(fcmd, FT_STATE_NEW); + return SCST_TGT_RES_FATAL_ERROR; + } } /* @@ -528,16 +554,14 @@ static void ft_send_resp_status(struct fc_frame *rx_fp, u32 status, lport->tt.seq_send(lport, sp, fp); out: - lport->tt.exch_done(fr_seq(rx_fp)); + ; #else fc_fill_reply_hdr(fp, rx_fp, FC_RCTL_DD_CMD_STATUS, 0); sp = fr_seq(fp); - if (sp) { + if (sp) lport->tt.seq_send(lport, sp, fp); - lport->tt.exch_done(sp); - } else { + else lport->tt.frame_send(lport, fp); - } #endif } @@ -651,7 +675,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) { struct fc_seq *sp; struct scst_cmd *cmd; - struct ft_cmd *fcmd; + struct ft_cmd *fcmd = NULL; struct fcp_cmnd *fcp; struct fc_lport *lport; int data_dir; @@ -659,6 +683,15 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) int cdb_len; lport = sess->tport->lport; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + sp = fr_seq(fp); +#else + sp = lport->tt.seq_assign(lport, fp); + if (!sp) + goto busy; +#endif + fcmd = kzalloc(sizeof(*fcmd), GFP_ATOMIC); if (!fcmd) goto busy; @@ -702,13 +735,6 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) scst_cmd_set_tgt_priv(cmd, fcmd); cmd->state = FT_STATE_NEW; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) - sp = fr_seq(fp); -#else - sp = lport->tt.seq_assign(lport, fp); - if (!sp) - goto busy; -#endif fcmd->seq = sp; lport->tt.seq_set_resp(sp, ft_recv_seq, cmd); @@ -757,6 +783,8 @@ busy: ft_send_resp_status(fp, SAM_STAT_BUSY, 0); if (fcmd) ft_cmd_done(fcmd); + else if (sp) + lport->tt.exch_done(sp); } /* diff --git a/fcst/ft_io.c b/fcst/ft_io.c index 26305eecb..19be72e8b 100644 --- a/fcst/ft_io.c +++ b/fcst/ft_io.c @@ -17,8 +17,7 @@ * more details. * * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + * this program. */ #include #include @@ -176,10 +175,17 @@ int ft_send_read_data(struct scst_cmd *cmd) remaining ? (FC_FC_EX_CTX | FC_FC_REL_OFF) : (FC_FC_EX_CTX | FC_FC_REL_OFF | FC_FC_END_SEQ), fh_off); - error = lport->tt.seq_send(lport, fcmd->seq, fp); + error = FCST_INJ_SEND_ERR(lport->tt.seq_send(lport, fcmd->seq, + fp)); if (error) { - WARN_ON(1); - /* XXX For now, initiator will retry */ + pr_warn("Sending frame with oid %#x oxid %#x resp_len" + " %d failed at frame_off %u / remaining %zu" + " with error code %d - %s", ep->oid, ep->oxid, + scst_cmd_get_resp_data_len(cmd), frame_off, + remaining, error, error == -ENOMEM ? + "retrying" : "giving up"); + return error == -ENOMEM ? SCST_TGT_RES_QUEUE_FULL : + SCST_TGT_RES_FATAL_ERROR; } else fcmd->read_data_len = frame_off; } diff --git a/fcst/ft_sess.c b/fcst/ft_sess.c index 3ce88bca4..1690a87d1 100644 --- a/fcst/ft_sess.c +++ b/fcst/ft_sess.c @@ -350,10 +350,8 @@ static struct ft_sess *ft_sess_delete(struct ft_tport *tport, u32 port_id) */ static void ft_sess_close(struct ft_sess *sess) { - struct fc_lport *lport; u32 port_id; - lport = sess->tport->lport; port_id = sess->port_id; if (port_id == -1) return; diff --git a/iscsi-scst/COPYING b/iscsi-scst/COPYING index afd5a9471..31b2c9e30 100644 --- a/iscsi-scst/COPYING +++ b/iscsi-scst/COPYING @@ -3,7 +3,6 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -305,8 +304,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. Also add information on how to contact you by electronic and paper mail. diff --git a/iscsi-scst/kernel/config.c b/iscsi-scst/kernel/config.c index 49d427ad0..b51a43293 100644 --- a/iscsi-scst/kernel/config.c +++ b/iscsi-scst/kernel/config.c @@ -407,9 +407,7 @@ static int add_session(void __user *ptr) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif info = kzalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) { diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 463ce522a..a1f85843e 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -92,9 +92,7 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session) struct sock *sk; char buf[64]; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif list_for_each_entry(conn, &session->conn_list, conn_list_entry) { sk = conn->sock->sk; @@ -246,9 +244,7 @@ int conn_sysfs_add(struct iscsi_conn *conn) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&conn->target->target_mutex); -#endif iscsi_get_initiator_ip(conn, addr, sizeof(addr)); @@ -319,9 +315,7 @@ struct iscsi_conn *conn_lookup(struct iscsi_session *session, u16 cid) { struct iscsi_conn *conn; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif /* * We need to find the latest conn to correctly handle @@ -815,9 +809,7 @@ void conn_free(struct iscsi_conn *conn) TRACE_MGMT_DBG("Freeing conn %p (sess=%p, %#Lx %u)", conn, session, (long long unsigned int)session->sid, conn->cid); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&conn->target->target_mutex); -#endif del_timer_sync(&conn->rsp_timer); @@ -922,9 +914,7 @@ int iscsi_conn_alloc(struct iscsi_session *session, struct iscsi_conn *conn; int res = 0; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif conn = kmem_cache_zalloc(iscsi_conn_cache, GFP_KERNEL); if (!conn) { @@ -988,9 +978,7 @@ int __add_conn(struct iscsi_session *session, struct iscsi_kern_conn_info *info) bool reinstatement = false; struct iscsit_transport *t; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif conn = conn_lookup(session, info->cid); if ((conn != NULL) && diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 459668831..35aea61c5 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1585,9 +1585,8 @@ static int cmnd_prepare_recv_pdu(struct iscsi_conn *conn, iscsi_extracheck_is_rd_thread(conn); buff_offs = offset; - idx = (offset + sg[0].offset) >> PAGE_SHIFT; - if (offset + sg[0].offset >= PAGE_SIZE) - offset += sg[0].offset; + offset += sg[0].offset; + idx = offset >> PAGE_SHIFT; offset &= ~PAGE_MASK; conn->read_msg.msg_iov = conn->read_iov; @@ -1608,9 +1607,9 @@ static int cmnd_prepare_recv_pdu(struct iscsi_conn *conn, addr = (char __force __user *)(sg_virt(&sg[idx])); EXTRACHECKS_BUG_ON(addr == NULL); - sg_len = sg[idx].length - offset; + sg_len = sg[idx].offset + sg[idx].length - offset; - conn->read_iov[i].iov_base = addr + offset; + conn->read_iov[i].iov_base = addr + offset - sg[idx].offset; if (size <= sg_len) { TRACE_DBG("idx=%d, i=%d, offset=%u, size=%d, addr=%p", @@ -3733,7 +3732,7 @@ static void iscsi_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd) case SCST_ABORT_ALL_TASKS_SESS: case SCST_ABORT_ALL_TASKS: case SCST_NEXUS_LOSS: - sBUG_ON(1); + sBUG(); break; default: iscsi_send_task_mgmt_resp(req, status, scst_mgmt_cmd_dropped(scst_mcmd)); diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 8140bf6a9..6c30f28a8 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -807,9 +807,8 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) INIT_LIST_HEAD(&isert_dev->conn_list); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&dev_list_mutex); -#endif + isert_dev_list_add(isert_dev); pr_info("iser created device:%p\n", isert_dev); @@ -843,9 +842,8 @@ static void isert_device_release(struct isert_device *isert_dev) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&dev_list_mutex); -#endif + isert_dev_list_remove(isert_dev); /* remove from global list */ for (i = 0; i < isert_dev->num_cqs; ++i) { diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 145174009..2af4188e7 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -369,7 +369,7 @@ void iscsi_task_mgmt_affected_cmds_done(struct scst_mgmt_cmd *scst_mcmd) case SCST_ABORT_ALL_TASKS_SESS: case SCST_ABORT_ALL_TASKS: case SCST_NEXUS_LOSS: - sBUG_ON(1); + sBUG(); break; default: /* Nothing to do */ @@ -1400,16 +1400,24 @@ retry: sg_size = size; if (sg != write_cmnd->rsp_sg) { + /* + * Data scatterlist. It is assumed that only the first element + * has a non-zero offset and that all elements except the + * first and the last have a length that is equal to + * PAGE_SIZE. + */ offset = conn->write_offset + sg[0].offset; idx = offset >> PAGE_SHIFT; - if (offset + sg[0].offset >= PAGE_SIZE) - offset += sg[0].offset; offset &= ~PAGE_MASK; length = min(size, (int)PAGE_SIZE - offset); TRACE_WRITE("write_offset %d, sg_size %d, idx %d, offset %d, " "length %d", conn->write_offset, sg_size, idx, offset, length); } else { + /* + * Response scatterlist. No assumptions are made about the + * offset nor about the length of scatterlist elements. + */ idx = 0; offset = conn->write_offset; while (offset >= sg[idx].length) { diff --git a/iscsi-scst/kernel/param.c b/iscsi-scst/kernel/param.c index 7b307530f..702d29ca3 100644 --- a/iscsi-scst/kernel/param.c +++ b/iscsi-scst/kernel/param.c @@ -257,9 +257,7 @@ static int iscsi_tgt_params_set(struct iscsi_session *session, struct iscsi_tgt_params *params = &session->tgt_params; int32_t *iparams = info->target_params; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif if (set) { struct iscsi_conn *conn; @@ -327,9 +325,7 @@ int iscsi_params_set(struct iscsi_target *target, int err; struct iscsi_session *session; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif if (info->sid == 0) { PRINT_ERROR("sid must not be %d", 0); diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index ddd64adf1..b03cffdab 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -25,9 +25,7 @@ struct iscsi_session *session_lookup(struct iscsi_target *target, u64 sid) { struct iscsi_session *session; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif list_for_each_entry(session, &target->session_list, session_list_entry) { @@ -46,9 +44,7 @@ static int iscsi_session_alloc(struct iscsi_target *target, struct iscsi_session *session; char *name = NULL; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif session = kmem_cache_zalloc(iscsi_sess_cache, GFP_KERNEL); if (!session) @@ -138,9 +134,7 @@ void sess_reinst_finished(struct iscsi_session *sess) TRACE_MGMT_DBG("Enabling reinstate successor sess %p", sess); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&sess->target->target_mutex); -#endif sBUG_ON(!sess->sess_reinstating); @@ -165,9 +159,7 @@ int __add_session(struct iscsi_target *target, TRACE_MGMT_DBG("Adding session SID %llx", info->sid); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif err = iscsi_session_alloc(target, info, &new_sess); if (err != 0) @@ -318,9 +310,7 @@ int session_free(struct iscsi_session *session, bool del) TRACE_MGMT_DBG("Freeing session %p (SID %llx)", session, session->sid); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&session->target->target_mutex); -#endif sBUG_ON(!list_empty(&session->conn_list)); if (unlikely(atomic_read(&session->active_cmds) != 0)) { @@ -376,9 +366,7 @@ int __del_session(struct iscsi_target *target, u64 sid) { struct iscsi_session *session; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif session = session_lookup(target, sid); if (!session) @@ -400,9 +388,7 @@ void iscsi_sess_force_close(struct iscsi_session *sess) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&sess->target->target_mutex); -#endif PRINT_INFO("Deleting session %llx with initiator %s (%p)", (long long unsigned int)sess->sid, sess->initiator_name, sess); @@ -424,9 +410,7 @@ static void iscsi_session_info_show(struct seq_file *seq, { struct iscsi_session *session; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif list_for_each_entry(session, &target->session_list, session_list_entry) { diff --git a/iscsi-scst/kernel/target.c b/iscsi-scst/kernel/target.c index ef364e541..0c3280d3f 100644 --- a/iscsi-scst/kernel/target.c +++ b/iscsi-scst/kernel/target.c @@ -34,9 +34,7 @@ struct iscsi_target *target_lookup_by_id(u32 id) { struct iscsi_target *target; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif list_for_each_entry(target, &target_list, target_list_entry) { if (target->tid == id) @@ -50,9 +48,7 @@ static struct iscsi_target *target_lookup_by_name(const char *name) { struct iscsi_target *target; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif list_for_each_entry(target, &target_list, target_list_entry) { if (!strcmp(target->name, name)) @@ -71,9 +67,7 @@ static int iscsi_target_create(struct iscsi_kern_target_info *info, u32 tid, TRACE_MGMT_DBG("Creating target tid %u, name %s", tid, name); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif len = strlen(name); if (!len) { @@ -144,9 +138,7 @@ int __add_target(struct iscsi_kern_target_info *info) struct iscsi_kern_attr __user *attrs_ptr; #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif if (nr_targets > MAX_NR_TARGETS) { err = -EBUSY; @@ -262,9 +254,7 @@ int __del_target(u32 id) struct iscsi_target *target; int err; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target_mgmt_mutex); -#endif target = target_lookup_by_id(id); if (!target) { @@ -302,9 +292,7 @@ void target_del_session(struct iscsi_target *target, TRACE_MGMT_DBG("Deleting session %p", session); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif if (!list_empty(&session->conn_list)) { struct iscsi_conn *conn, *tc; @@ -330,9 +318,7 @@ void target_del_all_sess(struct iscsi_target *target, int flags) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&target->target_mutex); -#endif if (!list_empty(&target->session_list)) { TRACE_MGMT_DBG("Deleting all sessions from target %p", target); diff --git a/iscsi-scst/resource_agents/SCSTLun b/iscsi-scst/resource_agents/SCSTLun index 4e20bd069..eb84596be 100644 --- a/iscsi-scst/resource_agents/SCSTLun +++ b/iscsi-scst/resource_agents/SCSTLun @@ -26,8 +26,7 @@ # other software, or any other product whatsoever. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +# along with this program. # ####################################################################### diff --git a/iscsi-scst/resource_agents/SCSTTarget b/iscsi-scst/resource_agents/SCSTTarget index c1f4e2ad1..008eeb745 100644 --- a/iscsi-scst/resource_agents/SCSTTarget +++ b/iscsi-scst/resource_agents/SCSTTarget @@ -22,8 +22,7 @@ # other software, or any other product whatsoever. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +# along with this program. # ####################################################################### diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index 287210a1f..a54309be4 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -344,7 +344,8 @@ static int chap_rand(void) fd = open("/dev/urandom", O_RDONLY); assert(fd != -1); - (void)read(fd, &r, sizeof(r)); + if (read(fd, &r, sizeof(r)) < sizeof(r)) { + } close(fd); return r; } diff --git a/iscsi-scst/usr/isns.c b/iscsi-scst/usr/isns.c index 8fa916099..cdd7c3e4e 100644 --- a/iscsi-scst/usr/isns.c +++ b/iscsi-scst/usr/isns.c @@ -16,9 +16,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA + * along with this program. */ #include diff --git a/iscsi-scst/usr/isns_proto.h b/iscsi-scst/usr/isns_proto.h index c9ab970d4..49e45556f 100644 --- a/iscsi-scst/usr/isns_proto.h +++ b/iscsi-scst/usr/isns_proto.h @@ -16,9 +16,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA + * along with this program. */ #ifndef ISNS_PROTO_H diff --git a/mvsas_tgt/mv_64xx.c b/mvsas_tgt/mv_64xx.c index 48a450b4f..4b5b00e91 100644 --- a/mvsas_tgt/mv_64xx.c +++ b/mvsas_tgt/mv_64xx.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #include "mv_sas.h" diff --git a/mvsas_tgt/mv_64xx.h b/mvsas_tgt/mv_64xx.h index 179135222..8f3d07f2e 100644 --- a/mvsas_tgt/mv_64xx.h +++ b/mvsas_tgt/mv_64xx.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifndef _MVS64XX_REG_H_ diff --git a/mvsas_tgt/mv_94xx.c b/mvsas_tgt/mv_94xx.c index b7404d5f5..ec9612608 100644 --- a/mvsas_tgt/mv_94xx.c +++ b/mvsas_tgt/mv_94xx.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #include "mv_sas.h" diff --git a/mvsas_tgt/mv_94xx.h b/mvsas_tgt/mv_94xx.h index cd1a1f5e7..634cfcb41 100644 --- a/mvsas_tgt/mv_94xx.h +++ b/mvsas_tgt/mv_94xx.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifndef _MVS94XX_REG_H_ diff --git a/mvsas_tgt/mv_chips.h b/mvsas_tgt/mv_chips.h index fdad49204..99aa58ed8 100644 --- a/mvsas_tgt/mv_chips.h +++ b/mvsas_tgt/mv_chips.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ diff --git a/mvsas_tgt/mv_defs.h b/mvsas_tgt/mv_defs.h index c2bf56ded..090896ae3 100644 --- a/mvsas_tgt/mv_defs.h +++ b/mvsas_tgt/mv_defs.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifndef _MV_DEFS_H_ diff --git a/mvsas_tgt/mv_init.c b/mvsas_tgt/mv_init.c index 1994912e4..4e381ba9d 100644 --- a/mvsas_tgt/mv_init.c +++ b/mvsas_tgt/mv_init.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ @@ -195,7 +193,7 @@ static void mvs_tasklet(unsigned long opaque) mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[0]; if (unlikely(!mvi)) - BUG_ON(1); + BUG(); for (i = 0; i < core_nr; i++) { mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[i]; diff --git a/mvsas_tgt/mv_sas.c b/mvsas_tgt/mv_sas.c index c3736c705..fe778dc93 100644 --- a/mvsas_tgt/mv_sas.c +++ b/mvsas_tgt/mv_sas.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. * * Changelog: * - Praveen Murali May 15, 2012 diff --git a/mvsas_tgt/mv_sas.h b/mvsas_tgt/mv_sas.h index b698fd97f..731343877 100644 --- a/mvsas_tgt/mv_sas.h +++ b/mvsas_tgt/mv_sas.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifndef _MV_SAS_H_ diff --git a/mvsas_tgt/mv_spi.c b/mvsas_tgt/mv_spi.c index 2e51e3f2b..35bf89a5c 100644 --- a/mvsas_tgt/mv_spi.c +++ b/mvsas_tgt/mv_spi.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ diff --git a/mvsas_tgt/mv_spi.h b/mvsas_tgt/mv_spi.h index f60892b38..04648c62e 100644 --- a/mvsas_tgt/mv_spi.h +++ b/mvsas_tgt/mv_spi.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifdef SUPPORT_TARGET diff --git a/mvsas_tgt/mv_tgt.c b/mvsas_tgt/mv_tgt.c index b2c6ff8dd..86c5a49fa 100644 --- a/mvsas_tgt/mv_tgt.c +++ b/mvsas_tgt/mv_tgt.c @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifdef SUPPORT_TARGET @@ -1226,7 +1224,7 @@ static void mvst_do_cmd_completion(struct mvs_info *mvi, TRACE_DBG("Read data command %p finished", cmd); if (err) { cmd->cmd_state = MVST_STATE_SEND_DATA_RETRY; - sBUG_ON(1); + sBUG(); } goto out; } else if (cmd->cmd_state == MVST_STATE_ABORTED) { diff --git a/mvsas_tgt/mv_tgt.h b/mvsas_tgt/mv_tgt.h index 97c422135..0058854f7 100644 --- a/mvsas_tgt/mv_tgt.h +++ b/mvsas_tgt/mv_tgt.h @@ -17,9 +17,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * along with this program. */ #ifdef SUPPORT_TARGET diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 386eb4801..0834aa94b 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -157,7 +157,7 @@ particular port. Setting this attribute to 1 will reverse current status of the initiator mode from enabled to disabled and vice versa. -Explicit conformation +Explicit confirmation --------------------- This option should (actually, almost always must) be enabled by echoing @@ -281,7 +281,7 @@ Each target subdirectory contains the following entries: of this FC port. It allows to finish configuring it before it starts accepting new connections. 0 by default. - - explicit_confirmation - allows to enable explicit conformations, see + - explicit_confirmation - allows to enable explicit confirmations, see above. - rel_tgt_id - allows to read or write SCSI Relative Target Port diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 346d6df25..3741f88fa 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -4956,7 +4956,7 @@ static void q2x_send_busy(scsi_qla_host_t *ha, atio_entry_t *atio) ctio->flags |= cpu_to_le16(OF_INC_RC); /* * CTIO from fw w/o scst_cmd doesn't provide enough info to retry it, - * if the explicit conformation is used. + * if the explicit confirmation is used. */ TRACE_BUFFER("CTIO BUSY packet data", ctio, REQUEST_ENTRY_SIZE); @@ -5017,7 +5017,7 @@ static void q24_send_busy(scsi_qla_host_t *ha, atio7_entry_t *atio, CTIO7_FLAGS_DONT_RET_CTIO); /* * CTIO from fw w/o scst_cmd doesn't provide enough info to retry it, - * if the explicit conformation is used. + * if the explicit confirmation is used. */ ctio->ox_id = swab16(atio->fcp_hdr.ox_id); ctio->scsi_status = cpu_to_le16(status); @@ -5606,7 +5606,7 @@ static void q2t_exec_sess_work(struct q2t_tgt *tgt, loop_id = GET_TARGET_ID(ha, &prm->tm_iocb); break; default: - sBUG_ON(1); + sBUG(); break; } @@ -5683,7 +5683,7 @@ send: break; } default: - sBUG_ON(1); + sBUG(); break; } @@ -5733,7 +5733,7 @@ out_term: 0, 0, 0, 0, 0); break; default: - sBUG_ON(1); + sBUG(); break; } goto out_put; @@ -6355,12 +6355,12 @@ static ssize_t q2t_store_expl_conf_enabled(struct kobject *kobj, switch (buffer[0]) { case '0': ha->enable_explicit_conf = 0; - PRINT_INFO("qla2x00t(%ld): explicit conformations disabled", + PRINT_INFO("qla2x00t(%ld): explicit confirmations disabled", ha->instance); break; case '1': ha->enable_explicit_conf = 1; - PRINT_INFO("qla2x00t(%ld): explicit conformations enabled", + PRINT_INFO("qla2x00t(%ld): explicit confirmations enabled", ha->instance); break; default: diff --git a/qla2x00t/qla_attr.c b/qla2x00t/qla_attr.c index 993c404e3..1df02d8ee 100644 --- a/qla2x00t/qla_attr.c +++ b/qla2x00t/qla_attr.c @@ -192,12 +192,12 @@ qla2x00_store_expl_conf_enabled(struct device *dev, switch (buffer[0]) { case '0': ha->enable_explicit_conf = 0; - qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit conformation " + qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit confirmation " "disabled\n", ha->instance); break; case '1': ha->enable_explicit_conf = 1; - qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit conformation " + qla_printk(KERN_INFO, ha, "qla2xxx(%ld): explicit confirmation " "enabled\n", ha->instance); break; default: diff --git a/qla_isp/LICENSE b/qla_isp/LICENSE index 5a91588b4..93e55eea9 100644 --- a/qla_isp/LICENSE +++ b/qla_isp/LICENSE @@ -38,8 +38,7 @@ is the GNU Public License: GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. Matthew Jacob diff --git a/qla_isp/common/isp.c b/qla_isp/common/isp.c index a66e95772..6ef236ad8 100644 --- a/qla_isp/common/isp.c +++ b/qla_isp/common/isp.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_library.c b/qla_isp/common/isp_library.c index 256cdda41..fc7247e7e 100644 --- a/qla_isp/common/isp_library.c +++ b/qla_isp/common/isp_library.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_library.h b/qla_isp/common/isp_library.h index 95fb49dad..9a2f65610 100644 --- a/qla_isp/common/isp_library.h +++ b/qla_isp/common/isp_library.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_stds.h b/qla_isp/common/isp_stds.h index 5c4ee3fcb..432551def 100644 --- a/qla_isp/common/isp_stds.h +++ b/qla_isp/common/isp_stds.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_target.c b/qla_isp/common/isp_target.c index fe8966d0a..b25da91fb 100644 --- a/qla_isp/common/isp_target.c +++ b/qla_isp/common/isp_target.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_target.h b/qla_isp/common/isp_target.h index c957d1290..d3d380bd5 100644 --- a/qla_isp/common/isp_target.h +++ b/qla_isp/common/isp_target.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/isp_tpublic.h b/qla_isp/common/isp_tpublic.h index 364d76f1b..f55cdaf13 100644 --- a/qla_isp/common/isp_tpublic.h +++ b/qla_isp/common/isp_tpublic.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/ispmbox.h b/qla_isp/common/ispmbox.h index 9e1a829dd..a4ad35f1d 100644 --- a/qla_isp/common/ispmbox.h +++ b/qla_isp/common/ispmbox.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/ispreg.h b/qla_isp/common/ispreg.h index 1d2894581..a3eb744bb 100644 --- a/qla_isp/common/ispreg.h +++ b/qla_isp/common/ispreg.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/common/ispvar.h b/qla_isp/common/ispvar.h index 008e6ded9..4e627fdf5 100644 --- a/qla_isp/common/ispvar.h +++ b/qla_isp/common/ispvar.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/firmware/fwbin b/qla_isp/firmware/fwbin index fe00b5980..71d282c99 100755 --- a/qla_isp/firmware/fwbin +++ b/qla_isp/firmware/fwbin @@ -42,8 +42,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# along with this program. # # # Matthew Jacob diff --git a/qla_isp/linux-2.6/Makefile b/qla_isp/linux-2.6/Makefile index 326fa8d86..8a3fdd83c 100644 --- a/qla_isp/linux-2.6/Makefile +++ b/qla_isp/linux-2.6/Makefile @@ -14,8 +14,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# along with this program. # # # Matthew Jacob diff --git a/qla_isp/linux-2.6/build/Makefile b/qla_isp/linux-2.6/build/Makefile index 96ba94801..db836c075 100644 --- a/qla_isp/linux-2.6/build/Makefile +++ b/qla_isp/linux-2.6/build/Makefile @@ -12,8 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# along with this program. # # # Matthew Jacob diff --git a/qla_isp/linux/isp_cb_ops.c b/qla_isp/linux/isp_cb_ops.c index b906047d0..fc8ec4b5b 100644 --- a/qla_isp/linux/isp_cb_ops.c +++ b/qla_isp/linux/isp_cb_ops.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/linux/isp_ioctl.h b/qla_isp/linux/isp_ioctl.h index 9d64ca277..8184ca9ff 100644 --- a/qla_isp/linux/isp_ioctl.h +++ b/qla_isp/linux/isp_ioctl.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/linux/isp_linux.c b/qla_isp/linux/isp_linux.c index 60049a804..f907c3bec 100644 --- a/qla_isp/linux/isp_linux.c +++ b/qla_isp/linux/isp_linux.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/linux/isp_linux.h b/qla_isp/linux/isp_linux.h index 3a10e2588..331d4f896 100644 --- a/qla_isp/linux/isp_linux.h +++ b/qla_isp/linux/isp_linux.h @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/linux/isp_pci.c b/qla_isp/linux/isp_pci.c index c5d2b5bb2..b6d9ffa0e 100644 --- a/qla_isp/linux/isp_pci.c +++ b/qla_isp/linux/isp_pci.c @@ -40,8 +40,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/qla_isp/linux/isp_scst.c b/qla_isp/linux/isp_scst.c index 1d683a0b3..f9e0c7102 100644 --- a/qla_isp/linux/isp_scst.c +++ b/qla_isp/linux/isp_scst.c @@ -39,8 +39,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. * * * Matthew Jacob diff --git a/scst.spec.in b/scst.spec.in index 535875b0d..be3f821b6 100644 --- a/scst.spec.in +++ b/scst.spec.in @@ -122,7 +122,8 @@ find /lib/modules/%{kver} -name ib_srpt.ko -exec rm {} \; %{_mandir}/man8/iscsi-scstd.8.gz %{_sbindir}/iscsi-scst-adm %{_sbindir}/iscsi-scstd -%dir /var/lib/scst +%dir /var/lib/scst/pr +%dir /var/lib/scst/vdev_mode_pages %files devel %defattr(-,root,root) diff --git a/scst/COPYING b/scst/COPYING index 6fa77f597..d2469d5dd 100644 --- a/scst/COPYING +++ b/scst/COPYING @@ -2,7 +2,6 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -304,8 +303,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program. Also add information on how to contact you by electronic and paper mail. diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 5af2c6f5c..264c2af9c 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -108,10 +108,12 @@ #endif #ifdef CONFIG_SCST_EXTRACHECKS +#define EXTRACHECKS_BUG() sBUG() #define EXTRACHECKS_BUG_ON(a) sBUG_ON(a) #define EXTRACHECKS_WARN_ON(a) WARN_ON(a) #define EXTRACHECKS_WARN_ON_ONCE(a) WARN_ON_ONCE(a) #else +#define EXTRACHECKS_BUG() do { } while (0) #define EXTRACHECKS_BUG_ON(a) do { } while (0) #define EXTRACHECKS_WARN_ON(a) do { } while (0) #define EXTRACHECKS_WARN_ON_ONCE(a) do { } while (0) diff --git a/scst/src/Makefile b/scst/src/Makefile index 32575c7ef..09c0317e0 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -109,6 +109,7 @@ ifneq ($(MOD_VERS),) endif -/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER) mkdir -p $(DESTDIR)/var/lib/scst/pr + mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages @echo "****************************************************************" @echo "*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*" @echo "*!! !!*" diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index e2cf60d26..0ba4f86bc 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -1911,7 +1911,7 @@ again: dev_user_unjam_cmd(u, 0, NULL); goto again; case UCMD_STATE_EXECING: - EXTRACHECKS_BUG_ON(1); + EXTRACHECKS_BUG(); } } } diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 84906969d..6917d995e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1347,9 +1347,7 @@ static void vdisk_detach(struct scst_device *dev) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif TRACE_DBG("virt_id %d", dev->virt_id); @@ -1367,9 +1365,7 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) { int res; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif sBUG_ON(!virt_dev->filename); virt_dev->fd = vdev_open_fd(virt_dev, read_only); @@ -1390,9 +1386,7 @@ out: static void vdisk_close_fd(struct scst_vdisk_dev *virt_dev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (virt_dev->fd) { filp_close(virt_dev->fd, NULL); @@ -1409,9 +1403,7 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (virt_dev->tgt_dev_cnt++ > 0) goto out; @@ -1437,9 +1429,7 @@ static void vdisk_detach_tgt(struct scst_tgt_dev *tgt_dev) TRACE_ENTRY(); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (--virt_dev->tgt_dev_cnt == 0) vdisk_close_fd(virt_dev); @@ -1664,7 +1654,7 @@ static enum compl_status_e vdisk_exec_format_unit(struct vdisk_cmd_params *p) } break; default: - sBUG_ON(1); + sBUG(); break; } } @@ -3759,7 +3749,7 @@ static int vdisk_caching_pg(unsigned char *p, int pcontrol, p[2] |= (virt_dev->wt_flag_saved || virt_dev->nv_cache) ? 0 : WCE; break; default: - sBUG_ON(1); + sBUG(); break; } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 369686ae1..1b5552bc4 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -3782,9 +3782,7 @@ void scst_free_device(struct scst_device *dev) bool scst_device_is_exported(struct scst_device *dev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif WARN_ON_ONCE(!dev->dev_tgt_dev_list.next); @@ -9415,7 +9413,7 @@ int scst_parse_descriptors(struct scst_cmd *cmd) res = scst_parse_unmap_descriptors(cmd); break; default: - sBUG_ON(1); + sBUG(); res = -1; break; } @@ -9433,7 +9431,7 @@ static void scst_free_descriptors(struct scst_cmd *cmd) scst_free_unmap_descriptors(cmd); break; default: - sBUG_ON(1); + sBUG(); break; } diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index e85a9d0ed..9f242ac53 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1226,9 +1226,7 @@ static struct scst_device *__scst_lookup_device(struct scsi_device *scsidp) { struct scst_device *d; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(d, &scst_dev_list, dev_list_entry) if (d->scsi_dev == scsidp) diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index ac0eeee89..1c102733d 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -628,9 +628,7 @@ static inline void scst_reserve_dev(struct scst_device *dev, static inline void scst_clear_dev_reservation(struct scst_device *dev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&dev->dev_lock); -#endif dev->reserved_by = NULL; } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index c1465cd1d..153c71c7b 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2288,7 +2288,7 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd) } break; default: - sBUG_ON(1); + sBUG(); goto out_compl; } @@ -6991,9 +6991,7 @@ static char *scst_get_unique_sess_name(struct list_head *sysfs_sess_list, int len = 0, n = 1; BUG_ON(!initiator_name); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif restart: list_for_each_entry(s, sysfs_sess_list, sysfs_sess_list_entry) { diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index e9a3c91b9..62c7b70f5 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -77,9 +77,7 @@ static struct scst_device *__lookup_dev(const char *name) { struct scst_device *dev; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dev, &scst_dev_list, dev_list_entry) if (strcmp(dev->virt_name, name) == 0) @@ -94,9 +92,7 @@ static struct scst_tgt *__lookup_tgt(const char *name) struct scst_tgt_template *t; struct scst_tgt *tgt; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(t, &scst_template_list, scst_template_list_entry) list_for_each_entry(tgt, &t->tgt_list, tgt_list_entry) @@ -113,9 +109,7 @@ static struct scst_tg_tgt *__lookup_dg_tgt(struct scst_dev_group *dg, struct scst_target_group *tg; struct scst_tg_tgt *tg_tgt; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif BUG_ON(!dg); BUG_ON(!tgt_name); @@ -133,9 +127,7 @@ __lookup_tg_by_name(struct scst_dev_group *dg, const char *name) { struct scst_target_group *tg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(tg, &dg->tg_list, entry) if (strcmp(tg->name, name) == 0) @@ -151,9 +143,7 @@ __lookup_tg_by_tgt(struct scst_dev_group *dg, const struct scst_tgt *tgt) struct scst_target_group *tg; struct scst_tg_tgt *tg_tgt; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(tg, &dg->tg_list, entry) list_for_each_entry(tg_tgt, &tg->tgt_list, entry) @@ -169,9 +159,7 @@ static struct scst_dg_dev *__lookup_dg_dev_by_dev(struct scst_dev_group *dg, { struct scst_dg_dev *dgd; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dgd, &dg->dev_list, entry) if (dgd->dev == dev) @@ -186,9 +174,7 @@ static struct scst_dg_dev *__lookup_dg_dev_by_name(struct scst_dev_group *dg, { struct scst_dg_dev *dgd; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dgd, &dg->dev_list, entry) if (strcmp(dgd->dev->virt_name, name) == 0) @@ -203,9 +189,7 @@ static struct scst_dg_dev *__global_lookup_dg_dev_by_name(const char *name) struct scst_dev_group *dg; struct scst_dg_dev *dgd; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dg, &scst_dev_group_list, entry) { dgd = __lookup_dg_dev_by_name(dg, name); @@ -220,9 +204,7 @@ static struct scst_dev_group *__lookup_dg_by_name(const char *name) { struct scst_dev_group *dg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dg, &scst_dev_group_list, entry) if (strcmp(dg->name, name) == 0) @@ -236,9 +218,7 @@ static struct scst_dev_group *__lookup_dg_by_dev(struct scst_device *dev) { struct scst_dev_group *dg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dg, &scst_dev_group_list, entry) if (__lookup_dg_dev_by_dev(dg, dev)) @@ -355,9 +335,7 @@ static void scst_check_alua_invariant(void) struct scst_target_group *tg; enum scst_tg_state expected_state; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (!alua_invariant_check) return; @@ -392,9 +370,7 @@ static void scst_check_alua_invariant(void) static void scst_update_tgt_dev_alua_filter(struct scst_tgt_dev *tgt_dev, enum scst_tg_state state) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif tgt_dev->alua_filter = scst_alua_filter[state]; } @@ -404,9 +380,7 @@ static void scst_tg_change_tgt_dev_state(struct scst_tgt_dev *tgt_dev, enum scst_tg_state state, bool gen_ua) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif TRACE_MGMT_DBG("ALUA state of tgt_dev %p has changed", tgt_dev); scst_update_tgt_dev_alua_filter(tgt_dev, state); @@ -421,9 +395,7 @@ void scst_tg_init_tgt_dev(struct scst_tgt_dev *tgt_dev) struct scst_dev_group *dg; struct scst_target_group *tg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif dg = __lookup_dg_by_dev(tgt_dev->dev); if (dg) { @@ -445,9 +417,7 @@ static void scst_update_tgt_alua_filter(struct scst_target_group *tg, struct scst_dg_dev *dgd; struct scst_tgt_dev *tgt_dev; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dgd, &tg->dg->dev_list, entry) { list_for_each_entry(tgt_dev, &dgd->dev->dev_tgt_dev_list, @@ -471,9 +441,7 @@ static void scst_reset_tgt_alua_filter(struct scst_target_group *tg, struct scst_dg_dev *dgd; struct scst_tgt_dev *tgt_dev; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dgd, &tg->dg->dev_list, entry) { list_for_each_entry(tgt_dev, &dgd->dev->dev_tgt_dev_list, @@ -584,9 +552,7 @@ void scst_tg_tgt_remove_by_tgt(struct scst_tgt *tgt) struct scst_target_group *tg; struct scst_tg_tgt *t, *t2; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif BUG_ON(!tgt); list_for_each_entry(dg, &scst_dev_group_list, entry) @@ -723,9 +689,7 @@ static void __scst_tg_set_state(struct scst_target_group *tg, struct scst_tgt *tgt; sBUG_ON(state >= ARRAY_SIZE(scst_alua_filter)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (tg->state == state) return; @@ -789,9 +753,7 @@ static void __scst_gen_alua_state_changed_ua(struct scst_target_group *tg) struct scst_tg_tgt *tg_tgt; struct scst_tgt *tgt; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(dg_dev, &tg->dg->dev_list, entry) { dev = dg_dev->dev; @@ -814,9 +776,7 @@ static void __scst_tg_set_preferred(struct scst_target_group *tg, { bool prev_preferred; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif if (tg->preferred == preferred) return; @@ -859,9 +819,7 @@ static void scst_update_dev_alua_filter(struct scst_dev_group *dg, struct scst_tgt_dev *tgt_dev; struct scst_target_group *tg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(tgt_dev, &dev->dev_tgt_dev_list, dev_tgt_dev_list_entry) { @@ -881,9 +839,7 @@ static void scst_reset_dev_alua_filter(struct scst_device *dev) { struct scst_tgt_dev *tgt_dev; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_for_each_entry(tgt_dev, &dev->dev_tgt_dev_list, dev_tgt_dev_list_entry) @@ -1063,9 +1019,7 @@ static void __scst_dg_remove(struct scst_dev_group *dg) struct scst_dg_dev *dgdev; struct scst_target_group *tg; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) lockdep_assert_held(&scst_mutex); -#endif list_del(&dg->entry); scst_dg_sysfs_del(dg); diff --git a/scstadmin/LICENSE b/scstadmin/LICENSE index 08ddefd04..2a3b0f804 100644 --- a/scstadmin/LICENSE +++ b/scstadmin/LICENSE @@ -2,7 +2,6 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -304,8 +303,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + with this program. Also add information on how to contact you by electronic and paper mail.