From patchwork Thu Nov 29 07:16:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Konopko X-Patchwork-Id: 10704087 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 92E7D13AD for ; Thu, 29 Nov 2018 07:21:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B4FC2EBCF for ; Thu, 29 Nov 2018 07:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D7ED2EBE9; Thu, 29 Nov 2018 07:21:30 +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 5DE0E2EBE7 for ; Thu, 29 Nov 2018 07:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbeK2SZv (ORCPT ); Thu, 29 Nov 2018 13:25:51 -0500 Received: from mga18.intel.com ([134.134.136.126]:40583 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbeK2SZv (ORCPT ); Thu, 29 Nov 2018 13:25:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 23:21:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,293,1539673200"; d="scan'208";a="254297343" Received: from gklab-106-154.igk.intel.com ([10.102.106.154]) by orsmga004.jf.intel.com with ESMTP; 28 Nov 2018 23:21:26 -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 v4 0/5] lightnvm: Flexible metadata Date: Thu, 29 Nov 2018 08:16:01 +0100 Message-Id: <20181129071606.56942-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 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 | 30 ++++++++++++------ 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 | 16 ++++++---- include/linux/lightnvm.h | 8 ++++- 12 files changed, 233 insertions(+), 80 deletions(-)