Martin, On 2/22/17 13:24, Martin K. Petersen wrote: >>>>>> "Damien" == Damien Le Moal <damien.lemoal@xxxxxxx> writes: > > Damien, > > Damien> I think we would still need the check for REQ_TYPE_FS to avoid > Damien> interfering with SG_IO commands. As for the "medium access > Damien> command" test, I am not sure if the block layer is the right > Damien> place to define that since a request operation may map to > Damien> different commands depending on the device type > > Yeah, we should put that logic in sd.c since that's the entity preparing > the commands. > > Damien> Which approach do you prefer ? Keeping everything contained to > Damien> mpt3sas (so basically just fixing the problematic patch), or > Damien> cleaning up everything with sd_completed_bytes rewrite ? > > I was originally in favor of just patching mpt3sas since it's clearly > broken (a disk can't write a partial sector). But I don't think a device > driver should know how to special case REPORT ZONES or similar. That's > clearly SBC/ZBC territory, so I prefer the sd_completed_bytes() > approach. I do not see the problematic resid correction code in the mpt3sas driver in 4.11/scsi-queue branch. Is this expected ? Did the mpt3sas driver updates removed it ? It looks like that branch is based on 4.10.0-rc2. The mpt3sas was applied in rc7. Which branch should I use for basing the patches ? 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