Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-13 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> On Sun, Jul 13, 2014 at 10:52:53AM -0400, Douglas Gilbert wrote: >> 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

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-13 Thread Christoph Hellwig
On Sun, Jul 13, 2014 at 10:52:53AM -0400, Douglas Gilbert wrote: > 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). Actually it could be WRITE SAME (10) with or without u

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-13 Thread Douglas Gilbert
On 14-07-13 10:35 AM, Martin K. Petersen wrote: "Christoph" == Christoph Hellwig 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 Chr

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-13 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig 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

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-11 Thread Christoph Hellwig
On Fri, Jul 11, 2014 at 02:26:24PM +0200, Hannes Reinecke wrote: >> blk_add_request_payload(rq, page, len); >> -ret = scsi_setup_blk_pc_cmnd(sdp, rq); >> + >> +cmd->transfersize = len; >> +cmd->allowed = rq->retries; >> + >> +ret = scsi_init_io(cmd, GFP_ATOMIC); >> rq->__d

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-11 Thread Hannes Reinecke
On 06/29/2014 03:34 PM, Christoph Hellwig wrote: Simplify handling of discard requests by setting up the command directly instead of initializing request fields and then calling scsi_setup_blk_pc_cmnd to propagate the information into the command. Signed-off-by: Christoph Hellwig --- drivers/

Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-07 Thread Christoph Hellwig
On Mon, Jul 07, 2014 at 12:01:53AM +, Elliott, Robert (Server Storage) wrote: > > nr_sectors >>= ilog2(sdp->sector_size) - 9; > > - rq->timeout = SD_TIMEOUT; > > - > > - memset(rq->cmd, 0, rq->cmd_len); > > Is *cmd guaranteed to be zero at this point? Yes, scsi_setup_fs_cmnd takes ca

RE: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-06 Thread Elliott, Robert (Server Storage)
si@vger.kernel.org > Subject: RE: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard > requests > > > > > -Original Message- > > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > > ow...@vger.kernel.org] On Behalf Of Christoph Hellw

RE: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-07-06 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Christoph Hellwig > Sent: Sunday, 29 June, 2014 8:35 AM > To: James Bottomley > Cc: Martin K. Petersen; linux-scsi@vger.kernel.org > Subject: [P

[PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

2014-06-29 Thread Christoph Hellwig
Simplify handling of discard requests by setting up the command directly instead of initializing request fields and then calling scsi_setup_blk_pc_cmnd to propagate the information into the command. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 43 ---