From: Mike Christie <michaelc@cs.wisc.edu>
To: Christoph Hellwig <hch@lst.de>
Cc: James Bottomley <JBottomley@Parallels.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/4] scsi: explicitly release bidi buffers
Date: Mon, 31 Mar 2014 00:58:01 -0500 [thread overview]
Message-ID: <533903E9.3020300@cs.wisc.edu> (raw)
In-Reply-To: <1395936862-6938-2-git-send-email-hch@lst.de>
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.
next prev parent reply other threads:[~2014-03-31 5:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 16:14 misc scsi midlayer updates Christoph Hellwig
2014-03-27 16:14 ` [PATCH 1/4] scsi: explicitly release bidi buffers Christoph Hellwig
2014-03-31 5:58 ` Mike Christie [this message]
2014-03-31 6:10 ` Christoph Hellwig
2014-03-27 16:14 ` [PATCH 2/4] scsi: remove scsi_end_request Christoph Hellwig
2014-03-31 5:26 ` Nicholas A. Bellinger
2014-03-27 16:14 ` [PATCH 3/4] scsi: reintroduce scsi_driver.init_command Christoph Hellwig
2014-03-31 5:45 ` Nicholas A. Bellinger
2014-03-31 6:08 ` Christoph Hellwig
2014-03-31 6:20 ` Nicholas A. Bellinger
2014-03-31 6:56 ` Mike Christie
2014-03-31 8:09 ` Christoph Hellwig
2014-03-31 19:00 ` [PATCH 3/4 v2] " Christoph Hellwig
2014-03-27 16:14 ` [PATCH 4/4] scsi: handle command allocation failure in scsi_reset_provider Christoph Hellwig
2014-03-31 5:45 ` Nicholas A. Bellinger
2014-03-30 15:33 ` misc scsi midlayer updates Boaz Harrosh
2014-03-31 6:20 ` Christoph Hellwig
2014-03-31 21:55 ` Mike Christie
-- strict thread matches above, loose matches on Subject: below --
2014-05-01 14:51 scsi midlayer updates for 3.15 (resend) Christoph Hellwig
2014-05-01 14:51 ` [PATCH 1/4] scsi: explicitly release bidi buffers Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533903E9.3020300@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=JBottomley@Parallels.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.