On 2/12/21 1:26 AM, Mike Christie wrote: > + * This function must only be used by drivers that do their own > + * sync during shutdown and does not use target_stop_session. If there > + * is a failure this function will call into the fabric driver's > + * queue_status with a CHECK_CONDITION. > */ > -int target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, > +void target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, > unsigned char *cdb, unsigned char *sense, u64 unpacked_lun, > u32 data_length, int task_attr, int data_dir, int flags) > { > - return target_submit_cmd_map_sgls(se_cmd, se_sess, cdb, sense, > - unpacked_lun, data_length, task_attr, data_dir, > - flags, NULL, 0, NULL, 0, NULL, 0); > + target_init_cmd(se_cmd, se_sess, sense, unpacked_lun, data_length, > + task_attr, data_dir, flags); Hey Christoph, I think I misinterpreted your review comment about adding a warning here. I thought you wanted it so we could detect there was a problem early on. We can't do that, but I can do: + rc = target_init_cmd(se_cmd, se_sess, sense, unpacked_lun, data_length, + task_attr, data_dir, flags); + WARN(rc, "Invalid target_submit_cmd use. Driver must not use target_stop_session or call target_init_cmd directly.\n"); and we can at least warn someone at some point.