From patchwork Fri Nov 30 11:43:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Konopko X-Patchwork-Id: 10706181 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 5A88F1057 for ; Fri, 30 Nov 2018 11:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A4222FFE8 for ; Fri, 30 Nov 2018 11:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E45C2FFED; Fri, 30 Nov 2018 11:49:20 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D45312FFE8 for ; Fri, 30 Nov 2018 11:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbeK3W6T (ORCPT ); Fri, 30 Nov 2018 17:58:19 -0500 Received: from mga03.intel.com ([134.134.136.65]:41003 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbeK3W6T (ORCPT ); Fri, 30 Nov 2018 17:58:19 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2018 03:49:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,298,1539673200"; d="scan'208";a="108549569" Received: from gklab-106-154.igk.intel.com ([10.102.106.154]) by FMSMGA003.fm.intel.com with ESMTP; 30 Nov 2018 03:49:16 -0800 From: Igor Konopko To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, javier@cnexlabs.com, hans.holmberg@cnexlabs.com, igor.j.konopko@intel.com Subject: [PATCH v5 0/5] lightnvm: Flexible metadata Date: Fri, 30 Nov 2018 12:43:57 +0100 Message-Id: <20181130114402.43793-1-igor.j.konopko@intel.com> X-Mailer: git-send-email 2.14.5 MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series of patches extends the way how pblk can store L2P sector metadata. After this set of changes any size of NVMe metadata is supported in pblk. Also there is an support for case without NVMe metadata. Changes v4 --> v5: -rebase on top of ocssd/for-4.21/core Changes v3 --> v4: -rename nvm_alloc_dma_pool() to nvm_create_dma_pool() -split pblk_get_meta() calls and lba setting into two operations for better core readability -fixing compilation with CONFIG_NVM disabled -getting rid of unnecessary memcpy for packed metadata on write path -support for drives with oob size >0 and <16B in packed metadata mode -minor commit message updates Changes v2 --> v3: -Rebase on top of ocssd/for-4.21/core -get/set_meta_lba helpers were removed -dma reallocation was replaced with single allocation -oob metadata size was added to pblk structure -proper checks on pblk creation were added Changes v1 --> v2: -Revert sector meta size back to 16b for pblk -Dma pool for larger oob meta are handled in core instead of pblk -Pblk oob meta helpers uses __le64 as input outpu instead of u64 -Other minor fixes based on v1 patch review Igor Konopko (5): lightnvm: pblk: Move lba list to partial read context lightnvm: pblk: Helpers for OOB metadata lightnvm: Flexible DMA pool entry size lightnvm: Disable interleaved metadata lightnvm: pblk: Support for packed metadata drivers/lightnvm/core.c | 9 ++++-- drivers/lightnvm/pblk-core.c | 61 +++++++++++++++++++++++++++++++------ drivers/lightnvm/pblk-init.c | 44 +++++++++++++++++++++++++-- drivers/lightnvm/pblk-map.c | 20 +++++++----- drivers/lightnvm/pblk-rb.c | 3 ++ drivers/lightnvm/pblk-read.c | 66 +++++++++++++++++++++++----------------- drivers/lightnvm/pblk-recovery.c | 25 +++++++++------ drivers/lightnvm/pblk-sysfs.c | 7 +++++ drivers/lightnvm/pblk-write.c | 9 +++--- drivers/lightnvm/pblk.h | 24 +++++++++++++-- drivers/nvme/host/lightnvm.c | 6 ++-- include/linux/lightnvm.h | 3 +- 12 files changed, 209 insertions(+), 68 deletions(-) Tested-by: Hans Holmberg