On 03/27/2014 11:14 AM, Christoph Hellwig wrote:
> +static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd)
> +{
> +     struct scsi_data_buffer *bidi_sdb = cmd->request->next_rq->special;
> +
> +     scsi_free_sgtable(bidi_sdb);
> +     kmem_cache_free(scsi_sdb_cache, bidi_sdb);
> +     cmd->request->next_rq->special = NULL;
> +}
> +
>  /**
>   * __scsi_error_from_host_byte - translate SCSI error code into errno
>   * @cmd:     SCSI command (unused)
> @@ -800,6 +792,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned 
> int good_bytes)
>                       req->next_rq->resid_len = scsi_in(cmd)->resid;
>  
>                       scsi_release_buffers(cmd);
> +                     scsi_release_bidi_buffers(cmd);
>                       blk_end_request_all(req, 0);
>  
>                       scsi_next_command(cmd);
> 

Hey,

I just wanted to double check that the only time we do bidi requests is
when they come through as REQ_TYPE_BLOCK_PC requests. I saw some of the
code comments on the init side that indicated that, but there was that
scsi_end_request() -> scsi_release_buffers() -> __scsi_release_buffers()
 call which then did not make sense because we were passing in 1 for the
bidi check argument.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to