|
@@ -1827,6 +1827,8 @@ static bool target_handle_task_attr(struct se_cmd *cmd)
|
|
|
if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH)
|
|
|
return false;
|
|
|
|
|
|
+ cmd->se_cmd_flags |= SCF_TASK_ATTR_SET;
|
|
|
+
|
|
|
/*
|
|
|
* Check for the existence of HEAD_OF_QUEUE, and if true return 1
|
|
|
* to allow the passed struct se_cmd list of tasks to the front of the list.
|
|
@@ -1949,6 +1951,9 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
|
|
|
if (dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH)
|
|
|
return;
|
|
|
|
|
|
+ if (!(cmd->se_cmd_flags & SCF_TASK_ATTR_SET))
|
|
|
+ goto restart;
|
|
|
+
|
|
|
if (cmd->sam_task_attr == TCM_SIMPLE_TAG) {
|
|
|
atomic_dec_mb(&dev->simple_cmds);
|
|
|
dev->dev_cur_ordered_id++;
|
|
@@ -1965,7 +1970,7 @@ static void transport_complete_task_attr(struct se_cmd *cmd)
|
|
|
pr_debug("Incremented dev_cur_ordered_id: %u for ORDERED\n",
|
|
|
dev->dev_cur_ordered_id);
|
|
|
}
|
|
|
-
|
|
|
+restart:
|
|
|
target_restart_delayed_cmds(dev);
|
|
|
}
|
|
|
|