Christoph, On 2/14/17 15:18, hch@xxxxxx wrote: > On Tue, Feb 14, 2017 at 02:21:37PM +0900, Damien Le Moal wrote: >>> I think we want to keep the knowledge of which requests have a request size >>> that should be a multiple of the logical block size in the block layer core >>> or in the SCSI core but not in the mpt3sas driver. But I'm not sure what the >>> best approach is to do that. Should we use the request type, should we add a >>> new request attribute or should we add a new function? >> >> I agree. But the mpt3sas patch that introduced the problem is to solve >> problems with a buggy hardware in the first place... A quirck of some >> sort. So do we really need such a big change just the report zones >> exception ? (all other REQ_TYPE_FS commands either have no payload or >> the payload size is LBA aligned) >> >> Martin, James, Hannes, >> >> Please advise ! 4.10 is introducing zoned block device support, and from >> the first release that will be broken with mpt3sas HBAs if we do not >> patch this. Any preferred approach ? > > I suspect we'll need to move the workaround to the SD driver. While it's > an mpt bug, sd is the party that knows which kind of requests were > generated, so it's where we can fix up the length in the done callback. This makes sense. sd_done already sets report zone command resid to 0, always. So it make sense to have the mpt3sas check after that, written in a generic manner. I will send a patch shortly. Best regards. -- Damien Le Moal, Ph.D. Sr. Manager, System Software Research Group, Western Digital Corporation Damien.LeMoal@xxxxxxx (+81) 0466-98-3593 (ext. 513593) 1 kirihara-cho, Fujisawa, Kanagawa, 252-0888 Japan www.wdc.com, www.hgst.com