Re: [PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-10 Thread Martin K. Petersen
> "Or" == Or Gerlitz writes: Or> Just to make sure, by 3.16 you also mean 3.15.y, right? Yes. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo in

Re: [PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-10 Thread Or Gerlitz
On Tue, Jun 10, 2014 at 10:02 PM, Martin K. Petersen wrote: >> "Sagi" == Sagi Grimberg writes: > > +static inline unsigned scsi_prot_length(unsigned data_length, > + unsigned sector_size) > +{ > + switch (sector_size) { > + case 512: > +

Re: [PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-10 Thread Sagi Grimberg
On 6/10/2014 10:02 PM, Martin K. Petersen wrote: "Sagi" == Sagi Grimberg writes: +static inline unsigned scsi_prot_length(unsigned data_length, + unsigned sector_size) +{ + switch (sector_size) { + case 512: + return (data_length >

Re: [PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-10 Thread Martin K. Petersen
> "Sagi" == Sagi Grimberg writes: +static inline unsigned scsi_prot_length(unsigned data_length, + unsigned sector_size) +{ + switch (sector_size) { + case 512: + return (data_length >> 9) * 8; + case 1024: +

[PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-08 Thread Sagi Grimberg
In case protection information exists on the wire scsi transports should include it in the transfer byte count (even if protection information does not exist in the host memory space). This helper will compute the total transfer length from the scsi command data length and protection attributes. S