On Mon, Jun 26, 2017 at 3:08 PM, Vishal Verma <[email protected]> wrote:
> The UEFI 2.7 specification defines an updated BTT metadata format,
> bumping the revision to 2.0. Add support for the new format, while
> retaining compatibility for the old 1.1 format.
>
> Cc: Toshi Kani <[email protected]>
> Cc: Linda Knippers <[email protected]>
> Cc: Dan Williams <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>
> ---
>
> v2:
> - Don't enforce new BTTs being v2, base that decision on the holder class
> (Dan)
> - Refactor nd_btt_version slightly, and get rid of the version enum.
>
Looks good one more small change:
> diff --git a/drivers/nvdimm/btt_devs.c b/drivers/nvdimm/btt_devs.c
> index 31d875a..cd0718e 100644
> --- a/drivers/nvdimm/btt_devs.c
> +++ b/drivers/nvdimm/btt_devs.c
> @@ -260,20 +260,56 @@ bool nd_btt_arena_is_valid(struct nd_btt *nd_btt,
> struct btt_sb *super)
> }
> EXPORT_SYMBOL(nd_btt_arena_is_valid);
>
> +int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
> + struct btt_sb *btt_sb)
> +{
> + /*
> + * At this point, the claim class can only be 'BTT' or 'NONE'. BTT
> + * implies a BTT v2.0 and none implies v1.1
> + */
> + if (ndns->claim_class == NVDIMM_CCLASS_BTT) {
I think we need NVDIMM_CCLASS_BTT2 for this. I think it is valid to
enforce BTT1 vs BTT2 format even with v1.2 labels.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm