mirror of
https://github.com/SCST-project/scst.git
synced 2026-07-25 17:42:38 +00:00
Merged revisions 5671,5687-5697,5723 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x
................
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 Кирилл Тюшев <kirill.tyushev8@gmail.com>
........
................
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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) $@
|
||||
|
||||
+22
@@ -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__ */
|
||||
|
||||
+57
-29
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+11
-5
@@ -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 <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-3
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
|
||||
@@ -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.
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 <errno.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
|
||||
|
||||
+1
-3
@@ -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"
|
||||
|
||||
+1
-3
@@ -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_
|
||||
|
||||
+1
-3
@@ -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"
|
||||
|
||||
+1
-3
@@ -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_
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -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_
|
||||
|
||||
+2
-4
@@ -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];
|
||||
|
||||
+1
-3
@@ -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 <pmurali@logicube.com> May 15, 2012
|
||||
|
||||
+1
-3
@@ -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_
|
||||
|
||||
+1
-3
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
+2
-4
@@ -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) {
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
+1
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-1
@@ -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)
|
||||
|
||||
+1
-3
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 "*!! !!*"
|
||||
|
||||
@@ -1911,7 +1911,7 @@ again:
|
||||
dev_user_unjam_cmd(u, 0, NULL);
|
||||
goto again;
|
||||
case UCMD_STATE_EXECING:
|
||||
EXTRACHECKS_BUG_ON(1);
|
||||
EXTRACHECKS_BUG();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-3
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user