Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbaAMTnQ (ORCPT ); Mon, 13 Jan 2014 14:43:16 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:45700 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbaAMTnN (ORCPT ); Mon, 13 Jan 2014 14:43:13 -0500 Message-ID: <1389642191.12062.32.camel@dabdike.int.hansenpartnership.com> Subject: Re: [PATCH 09/14] target/configfs: Expose protection device attributes From: James Bottomley To: "Nicholas A. Bellinger" Cc: "Martin K. Petersen" , "Nicholas A. Bellinger" , target-devel , linux-scsi , linux-kernel , Christoph Hellwig , Hannes Reinecke , Sagi Grimberg , Or Gerlitz Date: Mon, 13 Jan 2014 11:43:11 -0800 In-Reply-To: <1389641243.5567.445.camel@haakon3.risingtidesystems.com> References: <1389212157-14540-1-git-send-email-nab@daterainc.com> <1389212157-14540-10-git-send-email-nab@daterainc.com> <1389637859.5567.431.camel@haakon3.risingtidesystems.com> <1389639177.12062.21.camel@dabdike.int.hansenpartnership.com> <1389641243.5567.445.camel@haakon3.risingtidesystems.com> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.8.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-01-13 at 11:27 -0800, Nicholas A. Bellinger wrote: > On Mon, 2014-01-13 at 10:52 -0800, James Bottomley wrote: > > On Mon, 2014-01-13 at 10:30 -0800, Nicholas A. Bellinger wrote: > > > Hey MKP, > > > > > > On Fri, 2014-01-10 at 16:01 -0500, Martin K. Petersen wrote: > > > > >>>>> "nab" == Nicholas A Bellinger writes: > > > > > > > > nab> This patch adds support for exposing DIF protection device > > > > nab> attributes via configfs. This includes: > > > > > > > > nab> pi_prot_type: Protection Type (0, 1, 3 currently support) > > > > nab> pi_prot_version: Protection Version (DIF v1 currently supported) > > > > > > > > What's DIF v2? > > > > > > > > > > This would be the proposed 16-byte protection scheme for SBC4. > > > > What proposed 16 byte scheme? The only DIF proposals I know for SBC-4 > > are 13-185R0 and 12-369R0 and that's a couple of new algorithms and > > types because we cannot change the 8 byte PI. > > > > Then I'm probably getting the SBC version wrong.. It's the one that > includes using CRC32C for the block guard, and larger space for > reference tag as mentioned by MKP. Well, this isn't reducing my confusion: I think you're referring to 12-369r0 which proposes to *eliminate* the reference tag (by moving it into the CRC calculation) and use the recovered 4 bytes to expand the CRC to CRC32 and add two bytes to the application tag, so they both become 4 bytes long, but the new PI still occupies only 8 bytes on disk. Perhaps it's also better to clarify the terminology: The PI is composed of a Guard field, which is the checksum, an application tag, which is usable by the application for anything it wants and a reference tag which is designed to be derived from the on-disk location so it can be used to detect misplaced writes. In Type 1 the reference tag has to be the lower 31 bits of the LBA and in type 3 it's application defined. In all current types, the guard is two bytes and the application tag two bytes. James -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/