Merge r7466 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-04 04:37:39 +00:00
parent 63e0483c42
commit 4e563735ee
4 changed files with 12 additions and 0 deletions
+2
View File
@@ -6621,6 +6621,7 @@ static void blockio_endio(struct bio *bio)
#endif
if (error == -ENOSPC) {
struct scst_vdisk_dev *virt_dev = blockio_work->cmd->dev->dh_priv;
WARN_ON(!virt_dev->thin_provisioned);
scst_set_cmd_error(blockio_work->cmd,
SCST_LOAD_SENSE(scst_space_allocation_failed_write_protect));
@@ -8025,6 +8026,7 @@ static void vdev_check_node(struct scst_vdisk_dev **pvirt_dev, int orig_nodeid)
if (virt_dev->numa_node_id != orig_nodeid) {
struct scst_vdisk_dev *v;
TRACE_MEM("Realloc virt_dev %s on node %d", virt_dev->name, nodeid);
/* It's read-mostly, so cache alignment isn't needed */
v = kzalloc_node(sizeof(*v), GFP_KERNEL, nodeid);
+4
View File
@@ -13901,6 +13901,7 @@ int scst_get_max_lun_commands(struct scst_session *sess, uint64_t lun)
if (sess == NULL) {
struct scst_device *dev;
list_for_each_entry(dev, &scst_dev_list, dev_list_entry) {
if (dev->handler == &scst_null_devtype)
continue;
@@ -13916,6 +13917,7 @@ int scst_get_max_lun_commands(struct scst_session *sess, uint64_t lun)
struct list_head *head =
&sess->sess_tgt_dev_list[SESS_TGT_DEV_LIST_HASH_FN(lun)];
struct scst_tgt_dev *tgt_dev;
list_for_each_entry(tgt_dev, head, sess_tgt_dev_list_entry) {
if (tgt_dev->lun == lun) {
res = tgt_dev->dev->max_tgt_dev_commands;
@@ -13931,6 +13933,7 @@ int scst_get_max_lun_commands(struct scst_session *sess, uint64_t lun)
for (i = 0; i < SESS_TGT_DEV_LIST_HASH_SIZE; i++) {
struct list_head *head = &sess->sess_tgt_dev_list[i];
struct scst_tgt_dev *tgt_dev;
list_for_each_entry(tgt_dev, head, sess_tgt_dev_list_entry) {
if (res > tgt_dev->dev->max_tgt_dev_commands)
res = tgt_dev->dev->max_tgt_dev_commands;
@@ -15841,6 +15844,7 @@ void scst_update_lat_stats(struct scst_cmd *cmd)
if (unlikely((scst_time < 0) || (tgt_time < 0) || (dev_time < 0))) {
/* It might happen due to small difference in time between CPUs */
static int q;
if (q++ < 20) {
PRINT_WARNING("Ignoring max latency sample, because time is "
"moving backward (cmd %p, scst %lld, tgt %lld, "
+3
View File
@@ -1788,6 +1788,7 @@ int scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmark)
for (i = 0; i < NR_CPUS; i++) {
char name[60];
if (!cpu_online(i))
continue;
scnprintf(name, sizeof(name), "sgv-%d", i);
@@ -1799,6 +1800,7 @@ int scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmark)
for (i = 0; i < NR_CPUS; i++) {
char name[60];
if (!cpu_online(i))
continue;
scnprintf(name, sizeof(name), "sgv-clust-%d", i);
@@ -1810,6 +1812,7 @@ int scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmark)
for (i = 0; i < NR_CPUS; i++) {
char name[60];
if (!cpu_online(i))
continue;
scnprintf(name, sizeof(name), "sgv-dma-%d", i);
+3
View File
@@ -4468,6 +4468,7 @@ again:
}
} else if (likely(cmd->tgt_dev != NULL)) {
struct scst_order_data *order_data = cmd->cur_order_data;
if (unlikely(order_data->aca_tgt_dev != 0)) {
if (!cmd->cmd_aca_allowed) {
spin_lock_irq(&order_data->sn_lock);
@@ -4504,6 +4505,7 @@ again:
if (unlikely(cmd->queue_type == SCST_CMD_QUEUE_ACA) &&
(cmd->tgt_dev != NULL)) {
struct scst_order_data *order_data = cmd->cur_order_data;
spin_lock_irq(&order_data->sn_lock);
if (order_data->aca_cmd == cmd) {
TRACE_MGMT_DBG("ACA cmd %p finished", cmd);
@@ -7196,6 +7198,7 @@ static void __scst_clear_aca(struct scst_tgt_dev *tgt_dev,
aca_cmd = order_data->aca_cmd;
if (aca_cmd != NULL) {
unsigned long flags;
TRACE_MGMT_DBG("Aborting pending ACA cmd %p", aca_cmd);
spin_lock_irqsave(&aca_cmd->sess->sess_list_lock, flags);
scst_abort_cmd(aca_cmd, mcmd, other_ini, (mcmd != NULL));