Received: by 10.223.185.116 with SMTP id b49csp1172715wrg; Fri, 23 Feb 2018 13:16:00 -0800 (PST) X-Google-Smtp-Source: AH8x226N3QRc9LevnCbYNOxTakYJie6JgoOLK0kTfO7+r51i+gYRpOUL9uj+uBMuZG663n31AJ0p X-Received: by 2002:a17:902:4d46:: with SMTP id o6-v6mr2850004plh.166.1519420560469; Fri, 23 Feb 2018 13:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519420560; cv=none; d=google.com; s=arc-20160816; b=txS2VGaNpkRD+YmQadNb1Ze391+SA4IQxS4dA0W0VkAiF9TSWZ3BnNdfSYN5QdhLFd 8BKgKvpARoznPO+diSO4Cr1NNIgHkA0zRVzUWT/3hJK/0cXSeA6Pw1j8GnJvxDdKsic1 eFaUHi8ztnxA21l5hCg5flhLstNcaK2n5dKsacm4PYUoZG0HqYVfazX++miCBXav3afV yuC/sYHqpg9q1ATEIamoUJ6KRhqCOjzh6VtxW7CLyf5UtP8kdswT+av7DWHl+zqHRsFO 09IT7JTt4ZTRBPGN7yeyUXiAJUolnH2VcFrO9zL/Z4OWTxZDGO4lbY4VdcwUFuyryULk bFfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=XSybjhLNBy0rhRmQYQHso/PNFR5cQjW3p6r+AUdZEQ0=; b=OHTTk/DAF9zQVljRrRefxXPz/Mlz2cQScrrOQ3QuFQ1K0H0Ah0IHR5z5fG18/RyhFr o9YhXONMO8vmi9PL2mT739FfH8ns2gsZZVaEsYc07mVAYMrwFTgJwh/BGqQ7Wid4G4Qv b65++uq1UnjCfSmvsFzMmSqi7tDIRb8GttyysV3AsJdOnbwsSxVjwj4XqQPuhg/nDEY8 oy+a51mFsUwO4Mncds1m16aQBw8E2+bBL1YcRoGnioxFY4DHU02dRU1mD/Ho6qRWpoK4 FehkIxGVkUnkmrbuqORtDrDoWewjtQg3MVhnjNc3sj1dmOxNgcpROt/2j7FJ20YgwuoN 530g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si2293558pli.804.2018.02.23.13.15.46; Fri, 23 Feb 2018 13:16:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752135AbeBWVOR (ORCPT + 99 others); Fri, 23 Feb 2018 16:14:17 -0500 Received: from g9t5009.houston.hpe.com ([15.241.48.73]:47672 "EHLO g9t5009.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbeBWVOQ (ORCPT ); Fri, 23 Feb 2018 16:14:16 -0500 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 7FB1F55; Fri, 23 Feb 2018 21:14:15 +0000 (UTC) Received: from misato.americas.hpqcorp.net (unknown [10.34.81.122]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 34E434D; Fri, 23 Feb 2018 21:14:15 +0000 (UTC) From: Toshi Kani To: dan.j.williams@intel.com Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Toshi Kani Subject: [PATCH 1/2] libnvdimm, label: change min label storage size per UEFI 2.7 Date: Fri, 23 Feb 2018 14:59:21 -0700 Message-Id: <20180223215922.25415-2-toshi.kani@hpe.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180223215922.25415-1-toshi.kani@hpe.com> References: <20180223215922.25415-1-toshi.kani@hpe.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UEFI 2.7 defines in page 758 that: Initial Label Storage Area Configuration : The minimum size of the Label Storage Area is large enough to hold 2 index blocks and 2 labels. The mininum index block size is 256 bytes, and the minimum label size is also 256 bytes. Change ND_LABEL_MIN_SIZE to (256 * 4) so that NVDIMM devices with the minimum label storage area do not fail with the size check in nvdimm_init_config_data(). Signed-off-by: Toshi Kani Cc: Dan Williams --- drivers/nvdimm/label.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h index 1ebf4d3d01ba..18bbe183b3a9 100644 --- a/drivers/nvdimm/label.h +++ b/drivers/nvdimm/label.h @@ -33,7 +33,7 @@ enum { BTTINFO_UUID_LEN = 16, BTTINFO_FLAG_ERROR = 0x1, /* error state (read-only) */ BTTINFO_MAJOR_VERSION = 1, - ND_LABEL_MIN_SIZE = 512 * 129, /* see sizeof_namespace_index() */ + ND_LABEL_MIN_SIZE = 256 * 4, /* see sizeof_namespace_index() */ ND_LABEL_ID_SIZE = 50, ND_NSINDEX_INIT = 0x1, };