diff mbox

[RFC] Simlify dif_verify routines and fixup fileio protection information code.

Message ID CAC5umyj9FsnumRhvNrzqE=Rtpy3O32SBw43ZP9M8H5B3htbRpw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Akinobu Mita April 14, 2015, 11:52 p.m. UTC
2015-04-15 2:20 GMT+09:00 Sagi Grimberg <sagig@dev.mellanox.co.il>:
> On 4/14/2015 3:17 PM, Akinobu Mita wrote:
>>
>> 2015-04-14 2:19 GMT+09:00 Sagi Grimberg <sagig@mellanox.com>:
>>>
>>> Hey All,
>>>
>>> This set follows the patchset from Akinobu Mita that addresses
>>> DIF bounce buffer sgl construction. Instead of trying to fix these
>>> bugs, this removes it altogether and work with cmd->t_prot_sg
>>> directly.
>>>
>>> The first patch is a simplification of the DIF verify varius
>>> routines leaving a single generic sbc_dif_verify that handles
>>> the protection information sgl we are working on.
>>>
>>> The second patch uses this simplification to remove the local
>>> prot_fd bounce buffer altogether.
>>>
>>> This passed minimal IO testing.
>>
>>
>> Looks good...
>>
>> I'll test with these patches and check if the problems I met
>> disappear.
>
>
> Thanks Akinobu,
>
> Waiting to hear your verdict before sending a formal patchset.

I hit a original bug in sbc_dif_verify() which is not introduced by
your patch set, though.  Please consider to include attached patch.
I'm still seeing another problem and trying to find out a root cause,
but it seems like it's caused by other change in -next.

Comments

Sagi Grimberg April 15, 2015, 10:07 a.m. UTC | #1
On 4/15/2015 2:52 AM, Akinobu Mita wrote:

>>>
>>> Looks good...
>>>
>>> I'll test with these patches and check if the problems I met
>>> disappear.
>>
>>
>> Thanks Akinobu,
>>
>> Waiting to hear your verdict before sending a formal patchset.
>
> I hit a original bug in sbc_dif_verify() which is not introduced by
> your patch set, though.

What is this original bug?

>  Please consider to include attached patch.

I'll include it. thanks.

> I'm still seeing another problem and trying to find out a root cause,
> but it seems like it's caused by other change in -next.
>

care to elaborate?

Sagi.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 3d88c00..65a0b5f 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -1311,7 +1311,7 @@  sbc_dif_verify(struct se_cmd *cmd, sector_t start, unsigned int sectors,
 
 	for_each_sg(cmd->t_data_sg, dsg, cmd->t_data_nents, i) {
 		daddr = kmap_atomic(sg_page(dsg)) + dsg->offset;
-		paddr = kmap_atomic(sg_page(psg)) + sg->offset;
+		paddr = kmap_atomic(sg_page(psg)) + psg->offset;
 
 		for (j = 0; j < dsg->length; j += dev->dev_attrib.block_size) {