Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2527752imm; Thu, 16 Aug 2018 10:56:52 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxITGXoZSBF1ynKIQGiGF/fc5BJg5zXLHgzIeeHmAacu12ZIpXn3N4rIKUQiGG5wFyNQ/Li X-Received: by 2002:a17:902:b944:: with SMTP id h4-v6mr29415709pls.157.1534442212014; Thu, 16 Aug 2018 10:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534442211; cv=none; d=google.com; s=arc-20160816; b=RSei2/dSXv10RmLJMRB8Awq6biOSTO4uYixVwgOrchllnoivY2UUmj61v7r56i9XKq 0JFaXj9BUO/qVpDSkZL+2jqvhXqkzOlBUV5RqwmeDp7+tAmaTEXY2PvtJFrIeLs9msFf 8ALcyOCVXzuPDjaimtvllHpvBZ7owJL7VwdRr0VZM9M3DEyxhYfcCrgMvimwerRyPe7v OYeJWsdVkBDiZjWzCTuM/dxmQTrLKDjrztqteIJ2BmtBa5hukxgZGDPE7KCjjo9Lhgvr nEcCsOTm753p8PHPzLWam9jvM//tR7Xmmw9H43B6kWJVqHOxLCRtiiYRrpNMOBcMG0ud PNzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Subax9Rmkay8BJ9objlFfmUWJgRdRhAIQcj91vI4W/c=; b=OjMVtUQd/if87i4KR0x0TQnuMTbI5rpp7a3gHJauvue7X+5IBed900AUmj7yySmRu+ keRtgAUx8fSFPKKjJZnlOEqqsYIYet8lC0I3cImm2P3dmQ9Emm0IJcklkqfJqLWFDOdx gcTPnKh+77YosvaXeeNaClfv0KlnD1qP44tZ72HJu9rDXXxYS4T261iKfCCdH+bFLuBE n4ktp/53tytK6C/pvY2bAXEjCX7vW5lOTIzgZ4WEa5Fie8DAWg5Z+SYFrgyiqhTsY56W B8ab7Z3CIdVTP4H8ZolLjGD/KoQ+YuKYxejWZuUhgz5Peq+qtIUNo+8bXPtnJZwlSZw0 K4ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="CN8sbb0/"; 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 x1-v6si21495608pln.336.2018.08.16.10.56.37; Thu, 16 Aug 2018 10:56:51 -0700 (PDT) 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; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="CN8sbb0/"; 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 S2391242AbeHPOca (ORCPT + 99 others); Thu, 16 Aug 2018 10:32:30 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41030 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391216AbeHPOca (ORCPT ); Thu, 16 Aug 2018 10:32:30 -0400 Received: by mail-pl0-f68.google.com with SMTP id w19-v6so1961752ply.8 for ; Thu, 16 Aug 2018 04:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Subax9Rmkay8BJ9objlFfmUWJgRdRhAIQcj91vI4W/c=; b=CN8sbb0/daU5vY0+CmBCEWBN4st0EIst8kpnn5C4KVRGTWWYil4MEBTnIhjCT2T2Ib KtzjOLZjJAsvRdi7bpCaHkwTmnRxBt4IgOwgYCyo3TK25/iBvr+rsuFLHIiRhs0WL921 muk4Sr0x1ASJz17jtmEO1kK3sF6ANE0NL/1TlMogXS/OisYCF1NpXJuQyb9JDwOz3Jw7 2g6WgaqQ7AzbzrnMigK28tKIYGrUIibKXgSPLCYZu0kCz3GX7rGVsQY9aYYD3aYFRpxZ Eft2ar0qsV8FxqUM8GBqfoKDKu5Wds/Sgq+U3tAhOibIs8QrpuJudXt/LVm+JsSa+s71 BNOg== 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:mime-version :content-transfer-encoding; bh=Subax9Rmkay8BJ9objlFfmUWJgRdRhAIQcj91vI4W/c=; b=WDoraDV2lmvpFwnqUmFYmDNh5eXVgkZPUNFampD+3t0cL+jsoNZUuMbDPmu5LsAoVq sOlrcn2S5SOSzID/016+1qSiCeLe9G+uYWwKR2aJjvUMgNiBvmJkYHNPEMt2Zs6cYINA vuXFyFMolupgohxJAKcsfwGHIG8zefRdU5LcrjRwO6eBPOTFf6+N4QpoS0Ku92JZoy/w cxLPIJLsqwC5vyWCm46hgEn/a51BwIAbYlBAU0Hi+OhiS7vmdZ08bweXB7lnPFi6XnmM 53cg0lB0JrrMRblNqDmY0fwvNw0JfWkaQTcmaMSSFTRB+aJeMCy0Ww1JGMR1d1jbCY1C LElw== X-Gm-Message-State: AOUpUlE5ubWlBfrieG6c1tvXPQfqrlLI5fonZqS3fqszcVXSNhGkihgV lNfrZOhMY/h85JE+QsXOImuf6w== X-Received: by 2002:a17:902:3e3:: with SMTP id d90-v6mr28577027pld.12.1534419271803; Thu, 16 Aug 2018 04:34:31 -0700 (PDT) Received: from skyninja.hgst.com (rap-us.hgst.com. [199.255.44.250]) by smtp.gmail.com with ESMTPSA id d12-v6sm30022530pfn.118.2018.08.16.04.34.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 04:34:30 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, javier@cnexlabs.com, hans.holmberg@cnexlabs.com, hlitz@ucsc.edu, youngtack.jin@circuitblvd.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [RFC PATCH v2 0/1] lightnvm: move bad block and chunk state logic to core Date: Thu, 16 Aug 2018 13:34:16 +0200 Message-Id: <20180816113417.3641-1-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch moves the 1.2 and 2.0 block/chunk metadata retrieval to core. Hi Javier, I did not end up using your patch. I had misunderstood what was implemented. Instead I implemented the detection of the each chunk by first sensing the first page, then the last page, and if the chunk is sensed as open, a per page scan will be executed to update the write pointer appropriately. Note that one needs a real drive to test the implementation. The 1.2 qemu implementation is lacking. I did update it a bit, such that it defaults to all blocks being free. It can be picked up in the ocssd qemu repository. Changes since v1: - Add sensing of chunks wrt to free/open/closed - Add update of write pointer if chunk state is open Matias Bjørling (1): lightnvm: move bad block and chunk state logic to core drivers/lightnvm/core.c | 310 +++++++++++++++++++++++++++++++++++-------- drivers/lightnvm/pblk-core.c | 6 +- drivers/lightnvm/pblk-init.c | 116 +--------------- drivers/lightnvm/pblk.h | 2 +- drivers/nvme/host/lightnvm.c | 4 +- include/linux/lightnvm.h | 15 +-- 6 files changed, 266 insertions(+), 187 deletions(-) -- 2.11.0