From: Douglas Gilbert <dgilbert@interlog.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests
Date: Sun, 13 Jul 2014 10:52:53 -0400 [thread overview]
Message-ID: <53C29D45.8000301@interlog.com> (raw)
In-Reply-To: <yq14myl1g3q.fsf@sermon.lab.mkp.net>
On 14-07-13 10:35 AM, Martin K. Petersen wrote:
>>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> writes:
>
> Christoph> Simplify handling of discard requests by setting up the
> Christoph> command directly instead of initializing request fields and
> Christoph> then calling scsi_setup_blk_pc_cmnd to propagate the
> Christoph> information into the command.
>
> Would be nice to add a comment similar to the WRITE SAME one. Something
> like:
>
> /*
> * Initially __data_len is set to the amount of data that needs to be
> * transferred to the target. This amount depends on whether WRITE SAME
> * or UNMAP is being used. After the scatterlist has been mapped by
> * scsi_init_io() we set __data_len to the size of the area to be
> * discarded on disk. This allows us to report completion on the full
> * amount of blocks described by the request.
> */
>
> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
To make things clearer when referring to the WRITE SAME command
I would suggest "WRITE SAME(unmap)" for the case when its UNMAP
field is 1 (as I assume it is in this case).
Doug Gilbert
next prev parent reply other threads:[~2014-07-13 14:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-29 13:34 RFC: clean up command setup Christoph Hellwig
2014-06-29 13:34 ` [PATCH 01/10] scsi: move the nr_phys_segments assert into scsi_init_io Christoph Hellwig
2014-07-11 12:17 ` Hannes Reinecke
2014-07-13 14:03 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 02/10] scsi: restructure command initialization for TYPE_FS requests Christoph Hellwig
2014-07-11 12:18 ` Hannes Reinecke
2014-07-13 14:04 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 03/10] scsi: set sc_data_direction in common code Christoph Hellwig
2014-07-11 12:19 ` Hannes Reinecke
2014-07-13 14:06 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 04/10] sd: don't use scsi_setup_blk_pc_cmnd for flush requests Christoph Hellwig
2014-07-11 12:20 ` Hannes Reinecke
2014-07-13 14:07 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 05/10] sd: don't use scsi_setup_blk_pc_cmnd for write same requests Christoph Hellwig
2014-07-11 12:25 ` Hannes Reinecke
2014-07-11 15:15 ` Christoph Hellwig
2014-07-13 14:14 ` Martin K. Petersen
2014-07-17 15:29 ` Christoph Hellwig
2014-06-29 13:34 ` [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests Christoph Hellwig
2014-07-07 0:01 ` Elliott, Robert (Server Storage)
2014-07-07 2:01 ` Elliott, Robert (Server Storage)
2014-07-07 9:24 ` Christoph Hellwig
2014-07-11 12:26 ` Hannes Reinecke
2014-07-11 15:15 ` Christoph Hellwig
2014-07-13 14:35 ` Martin K. Petersen
2014-07-13 14:52 ` Douglas Gilbert [this message]
2014-07-13 14:56 ` Christoph Hellwig
2014-07-13 15:03 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 07/10] sd: retry write same commands Christoph Hellwig
2014-07-11 12:26 ` Hannes Reinecke
2014-07-13 14:36 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 08/10] sd: retry discard commands Christoph Hellwig
2014-07-11 12:27 ` Hannes Reinecke
2014-07-13 14:36 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 09/10] sd: split sd_init_command Christoph Hellwig
2014-07-11 12:33 ` Hannes Reinecke
2014-07-13 14:37 ` Martin K. Petersen
2014-06-29 13:34 ` [PATCH 10/10] scsi: mark scsi_setup_blk_pc_cmnd static Christoph Hellwig
2014-07-11 12:33 ` Hannes Reinecke
2014-07-13 14:38 ` Martin K. Petersen
2014-07-11 9:16 ` RFC: clean up command setup 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=53C29D45.8000301@interlog.com \
--to=dgilbert@interlog.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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.