2015-04-26 18:53 GMT+09:00 Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx>: > On 4/25/2015 5:33 PM, Akinobu Mita wrote: >> >> For WRITE SAME, data transfer memory only contains a single block but >> protection information is required for all blocks that are written by >> the command. >> >> This makes sbc_dif_generate() and sbc_dif_verify() work for WRITE_SAME. > > > This feels a bit like an overshoot... > > You only have 1 block, is it really a good idea to calculate > the CRC over and over for write same? Wouldn't it be better to > have a really simple sbc_dif_generate_same() that calculates the > block CRC once and uses it for the entire payload (and watches for > Type 1 to increment the ref-tag)? Sounds good. I'll take the idea. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html