mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-22 07:06:22 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -5752,10 +5752,10 @@ static void q2t_async_event(uint16_t code, scsi_qla_host_t *vha,
|
||||
|
||||
default:
|
||||
TRACE(TRACE_MGMT, "qla2x00t(%ld): Async event %#x occurred: "
|
||||
"ignoring (m[1]=%x, m[2]=%x, m[3]=%x, m[4]=%x)",
|
||||
"ignoring (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)",
|
||||
vha->host_no, code,
|
||||
le16_to_cpu(mailbox[1]), le16_to_cpu(mailbox[2]),
|
||||
le16_to_cpu(mailbox[3]), le16_to_cpu(mailbox[4]));
|
||||
le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
|
||||
le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -5043,9 +5043,7 @@ static inline int __scst_get_buf(struct scst_cmd *cmd, int sg_cnt,
|
||||
goto out;
|
||||
}
|
||||
|
||||
*buf = page_address(sg_page(sg));
|
||||
*buf += sg->offset;
|
||||
|
||||
*buf = sg_virt(sg);
|
||||
res = sg->length;
|
||||
|
||||
cmd->get_sg_buf_entry_num++;
|
||||
|
||||
@@ -3953,6 +3953,28 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
static void dev_user_check_lost_ucmds(struct scst_user_dev *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
struct list_head *head = &dev->ucmd_hash[i];
|
||||
struct scst_user_cmd *ucmd2, *tmp;
|
||||
|
||||
list_for_each_entry_safe(ucmd2, tmp, head, hash_list_entry) {
|
||||
PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd2,
|
||||
ucmd2->state, atomic_read(&ucmd2->ucmd_ref));
|
||||
ucmd_put(ucmd2);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void dev_user_check_lost_ucmds(struct scst_user_dev *dev)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dev_user_process_cleanup(struct scst_user_dev *dev)
|
||||
{
|
||||
struct scst_user_cmd *ucmd;
|
||||
@@ -3988,22 +4010,7 @@ static int dev_user_process_cleanup(struct scst_user_dev *dev)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
struct list_head *head = &dev->ucmd_hash[i];
|
||||
struct scst_user_cmd *ucmd2, *tmp;
|
||||
|
||||
list_for_each_entry_safe(ucmd2, tmp, head, hash_list_entry) {
|
||||
PRINT_ERROR("Lost ucmd %p (state %x, ref %d)", ucmd2,
|
||||
ucmd2->state, atomic_read(&ucmd2->ucmd_ref));
|
||||
ucmd_put(ucmd2);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
dev_user_check_lost_ucmds(dev);
|
||||
|
||||
TRACE_DBG("Cleanuping done (dev %p)", dev);
|
||||
complete_all(&dev->cleanup_cmpl);
|
||||
|
||||
@@ -3322,6 +3322,8 @@ static enum compl_status_e fileio_exec_async(struct vdisk_cmd_params *p)
|
||||
length = scst_get_buf_next(cmd, &address);
|
||||
}
|
||||
|
||||
WARN_ON_ONCE(kvec - p->async.kvec != scst_get_buf_count(cmd));
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
|
||||
iov_iter_kvec(&iter, dir, p->async.kvec, kvec - p->async.kvec, total);
|
||||
#else
|
||||
|
||||
@@ -762,7 +762,7 @@ static int scst_pr_do_load_device_file(struct scst_device *dev,
|
||||
}
|
||||
pos += sizeof(version);
|
||||
|
||||
while (data_size < file_size) {
|
||||
while (data_size + 1 < file_size) {
|
||||
uint8_t *tid;
|
||||
|
||||
data_size++;
|
||||
@@ -794,7 +794,7 @@ static int scst_pr_do_load_device_file(struct scst_device *dev,
|
||||
dev->pr_scope = buf[pos];
|
||||
pos += sizeof(dev->pr_scope);
|
||||
|
||||
while (pos < file_size) {
|
||||
while (pos + 1 < file_size) {
|
||||
uint8_t is_holder;
|
||||
uint8_t *tid;
|
||||
struct scst_dev_registrant *reg = NULL;
|
||||
|
||||
@@ -4359,8 +4359,10 @@ static ssize_t scst_sess_latency_show(struct kobject *kobj,
|
||||
for (k = 0; k < SCST_CMD_STATE_COUNT; k++) {
|
||||
struct scst_lat_stats *lat_stats = sess->lat_stats;
|
||||
|
||||
if (!lat_stats || res >= PAGE_SIZE)
|
||||
continue;
|
||||
d = &lat_stats->ls[i][j][k];
|
||||
if (!lat_stats || d->count == 0 || res >= PAGE_SIZE)
|
||||
if (d->count == 0)
|
||||
continue;
|
||||
scst_get_cmd_state_name(state_name, sizeof(state_name),
|
||||
k);
|
||||
|
||||
Reference in New Issue
Block a user