Re: [PATCH -next v3] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-04-13 13:59 GMT+09:00 Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>:
> On Sat, 2015-04-11 at 13:17 +0900, Akinobu Mita wrote:
>> The scatterlist for protection information which is passed to
>> sbc_dif_verify_read() or sbc_dif_verify_write() requires that
>> neighboring scatterlist entries are contiguous or chained so that they
>> can be iterated by sg_next().
>>
>> However, the protection information for RD-MCP backends could be located
>> in the multiple scatterlist arrays when the ramdisk space is too large.
>> So if the read/write request straddles this boundary, sbc_dif_verify_read()
>> or sbc_dif_verify_write() can't iterate all scatterlist entries.
>>
>> This problem can be fixed by chaining protection information scatterlist
>> at creation time.  For the architectures which don't support sg chaining
>> (i.e. !CONFIG_ARCH_HAS_SG_CHAIN), fix it by allocating temporary
>> scatterlist if needed.
>>
>> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
>> Cc: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
>> Cc: Sagi Grimberg <sagig@xxxxxxxxxxxxxxxxxx>
>> Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
>> Cc: Christoph Hellwig <hch@xxxxxx>
>> Cc: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
>> Cc: target-devel@xxxxxxxxxxxxxxx
>> Cc: linux-scsi@xxxxxxxxxxxxxxx
>> ---
>> * v3
>> - Fix it by chaining protection information scatterlist at creation time
>>   if CONFIG_ARCH_HAS_SG_CHAIN is defined.
>>
>>  drivers/target/target_core_rd.c | 67 +++++++++++++++++++++++++++++++++++++++--
>>  1 file changed, 64 insertions(+), 3 deletions(-)
>
> Applied to target-pending/for-next.
>
> Thanks for updating to use CONFIG_ARCH_HAS_SG_CHAIN for the common
> case.  :)

BTW, does anyone know why some architectures disable
CONFIG_ARCH_HAS_SG_CHAIN?  As far as I can see, there is no additional
requirement to enable it for those that currently disable it.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux