From patchwork Fri Apr 21 07:12:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 9691969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81BBC60328 for ; Fri, 21 Apr 2017 07:12:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7380B28602 for ; Fri, 21 Apr 2017 07:12:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68A4528606; Fri, 21 Apr 2017 07:12:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 447DD28602 for ; Fri, 21 Apr 2017 07:12:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3A8192194EB63; Fri, 21 Apr 2017 00:12:47 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CA8C62194EB4B for ; Fri, 21 Apr 2017 00:12:45 -0700 (PDT) Received: by mail-io0-x242.google.com with SMTP id h41so27101141ioi.1 for ; Fri, 21 Apr 2017 00:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=baCkXKoMBRbMpMCg4jbvL1+gHk1+K8VmTDDRQYEJdfU=; b=UjC5QTbXeMyH2YiBfRQyV0Te0rqgyoRY9KaY3OeODkjqhqIBsGRRKpJP26TSFj1Z41 xsci3X+/gF7oFTVNGhQ1IL4V/Hz0qqB/LGqzuwfyU0W1P8EDRe28M3EdKAMax08+mpfG Mes0luX76DBon3B1CZjvTfkVUL9EoXeRrNlobVM7Xbqa/acoKdqrHkDj2SUZoLv5zSDL uOTxabKCzWwcXOuZj58BS3zXPKKdTIyfzJNYRlnXVUEwJu+WsM0qnn6hTssRNnDN+I3o 4mvEZbrjgUspeXLVt68NfOJINf5IXAOoUuds1t9VkdO41TAMuNt/78Mjb3qbvOSc2WMR YLZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=baCkXKoMBRbMpMCg4jbvL1+gHk1+K8VmTDDRQYEJdfU=; b=mdJxraCqb0YF9QbgOlDWTfJcnReW8GUIpYiNYLWCoXz6trmfJy44u6PAOF5KcRNPwV ntahphYuQTMOPE+KJVLET3QQpGYNKr2FjYN3aQyXmb8i5oG8Aldx2+WvyaGGwIUmszn1 rSc7GnDl/IJMmu48Hxaz8pT3DnI/if4uQOwB1afaHjM/yOph6jGwUkG8uaiybsnmZ1dp 73Rbysm27Ro1Obs+n36JfTU0GEPlTcqhxAQb2z/zWYv8VDD08hJe9JJxkF6UBAKRC5jB idKCRxdx6B7Lx1nfwL2AAMGrJoxCWlZD1s+R1qygWyil6Zh7QZONS8QCFWZAyV5Gqw6R sr6A== X-Gm-Message-State: AN3rC/4yWu5Yl403EOdRdLZpxgKkvaw63uATmvhZ+x6mYMcHhvXWQM0N S2ObqzMaaNtlELpH X-Received: by 10.99.168.77 with SMTP id i13mr10946956pgp.148.1492758765042; Fri, 21 Apr 2017 00:12:45 -0700 (PDT) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id y78sm14082658pff.107.2017.04.21.00.12.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Apr 2017 00:12:44 -0700 (PDT) From: Oliver O'Halloran To: linux-nvdimm@lists.01.org Subject: [PATCH 3/3] ndctl: print alignment of dax namespaces Date: Fri, 21 Apr 2017 17:12:19 +1000 Message-Id: <20170421071219.18744-3-oohall@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170421071219.18744-1-oohall@gmail.com> References: <20170421071219.18744-1-oohall@gmail.com> X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Print the alignment for dax namespaces creation. It's good to be explicit about it since about the selected region alignment dictates the type of faults we allow on the namespace. Signed-off-by: Oliver O'Halloran --- util/json.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/json.c b/util/json.c index d6a8d4c899ed..720d22559df0 100644 --- a/util/json.c +++ b/util/json.c @@ -299,6 +299,11 @@ struct json_object *util_namespace_to_json(struct ndctl_namespace *ndns, if (!jobj) goto err; json_object_object_add(jndns, "uuid", jobj); + jobj = json_object_new_int64(ndctl_dax_get_align(dax)); + if (!jobj) + goto err; + json_object_object_add(jndns, "align", jobj); + if (include_dax) { dax_region = ndctl_dax_get_daxctl_region(dax); jobj = util_daxctl_region_to_json(dax_region,