Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-26 Thread Jens Axboe
On 01/26/2017 12:37 PM, Christoph Hellwig wrote: > On Thu, Jan 26, 2017 at 11:12:51AM -0800, Bart Van Assche wrote: >> Where does the '* 3' come from? I think that deserves a comment. >> Additionally, this patch introduces a new warning when building with W=1: > > It's a magic factor copied from

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-26 Thread Christoph Hellwig
On Thu, Jan 26, 2017 at 11:12:51AM -0800, Bart Van Assche wrote: > Where does the '* 3' come from? I think that deserves a comment. > Additionally, this patch introduces a new warning when building with W=1: It's a magic factor copied from the old code :( That beeing said I really wonder if we

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-26 Thread Bart Van Assche
On 01/23/2017 07:29 AM, Christoph Hellwig wrote: > +int scsi_cmd_buf_len(struct request *rq) > +{ > + return scsi_req(rq)->cmd_len * 3; > +} > +EXPORT_SYMBOL(scsi_cmd_buf_len); Hello Christoph, Where does the '* 3' come from? I think that deserves a comment. Additionally, this patch

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-24 Thread Bart Van Assche
On Tue, 2017-01-24 at 09:09 +0100, h...@lst.de wrote: > On Tue, Jan 24, 2017 at 12:33:13AM +, Bart Van Assche wrote: > > Do we perhaps need a check before the above memcpy() call whether or not > > sense == NULL? > > Yes, probably. I didn't think of the case where the caller wouldn't > pass

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-24 Thread Hannes Reinecke
On 01/23/2017 04:29 PM, Christoph Hellwig wrote: > And require all drivers that want to support BLOCK_PC to allocate it > as the first thing of their private data. To support this the legacy > IDE and BSG code is switched to set cmd_size on their queues to let > the block layer allocate the

[PATCH 15/16] block: split scsi_request out of struct request

2017-01-23 Thread Christoph Hellwig
And require all drivers that want to support BLOCK_PC to allocate it as the first thing of their private data. To support this the legacy IDE and BSG code is switched to set cmd_size on their queues to let the block layer allocate the additional space. Signed-off-by: Christoph Hellwig