From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Busch Subject: Re: [PATCH] sd: dif sector calculation Date: Fri, 20 Sep 2013 16:52:06 -0600 (MDT) Message-ID: References: <1379475143-2792-1-git-send-email-keith.busch@intel.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from mga02.intel.com ([134.134.136.20]:50160 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481Ab3ITWwL (ORCPT ); Fri, 20 Sep 2013 18:52:11 -0400 In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: "Martin K. Petersen" Cc: Keith Busch , linux-scsi@vger.kernel.org, "James E.J. Bottomley" , Ric Wheeler On Fri, 20 Sep 2013, Martin K. Petersen wrote: >>>>>> "Keith" == Keith Busch writes: > > Keith> The ref tag should be the device's physical LBA rather than the > Keith> 512 byte bio sector. > > The bip sector is just a seed value set by the application. It is not > correct to scale it based on sector size or PI interval. If I follow the current implementation correctly and have a 4k physical block size, a two block write at LBA 0 will generate ref tags 0 and 1 for that operation. If I read back one block at LBA 1, the current code will expect the ref tag to be 8, but come back as 1, failing the compare.