From patchwork Mon Aug 5 23:28:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11077935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 286451398 for ; Mon, 5 Aug 2019 23:51:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 116BA201F3 for ; Mon, 5 Aug 2019 23:51:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02C7928800; Mon, 5 Aug 2019 23:51:00 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham 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 A3987201F3 for ; Mon, 5 Aug 2019 23:51:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 88967213281EC; Mon, 5 Aug 2019 16:53:30 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=dan.j.williams@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B2B9B213030A2 for ; Mon, 5 Aug 2019 16:45:30 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 16:42:59 -0700 X-IronPort-AV: E=Sophos;i="5.64,350,1559545200"; d="scan'208";a="198137723" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 16:42:59 -0700 Subject: [ndctl PATCH v4 0/7] Improvements for namespace creation/interrogation From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 05 Aug 2019 16:28:41 -0700 Message-ID: <156504772175.847544.11368833704527657055.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Changes since v3 [1]: - Drop the warning suppression for gcc9.1.1 the complains about taking the address of packed structure members. This needs a rethink since even the kernel's common ioctl payloads are defined to be packed. This will require something like the kernel's (get_unaligned()) helpers. (Jeff) - Fix up a static analysis report introduced by "ndctl/dimm: Minimize data-transfer for init-labels" [1]: https://lists.01.org/pipermail/linux-nvdimm/2019-August/022869.html --- This trimmed version includes the extent support for label operations which significantly speeds up common label operations like 'init-labels'. It also fixes up some surprising results from 'create-namespace' where it would fail even though available capacity is present. --- Dan Williams (7): ndctl/dimm: Support small label reads/writes ndctl/dimm: Minimize data-transfer for init-labels ndctl/dimm: Add offset and size options to {read,write,zero}-labels ndctl/dimm: Limit read-labels with --index option ndctl/namespace: Minimize label data transfer for autolabel ndctl/namespace: Continue region search on 'missing seed' event ndctl/namespace: Report ENOSPC when regions are full Documentation/ndctl/labels-options.txt | 9 ++ Documentation/ndctl/ndctl-read-labels.txt | 7 ++ ndctl/dimm.c | 92 +++++++++++++++++-------- ndctl/lib/dimm.c | 85 +++++++++++++++++++++-- ndctl/lib/libndctl.c | 108 +++++++++++++++++++++++++---- ndctl/lib/libndctl.sym | 9 ++ ndctl/lib/private.h | 4 - ndctl/libndctl.h | 9 ++ ndctl/namespace.c | 13 +++ util/util.h | 4 + 10 files changed, 285 insertions(+), 55 deletions(-)