Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp417436imm; Fri, 3 Aug 2018 05:45:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdiNl5Gdo7fWMHtd7XQ1ffRg6gUzjd0D55qDLd5JBv02DlCg/fX4O+fBy8lvBAKgqBu/MUQ X-Received: by 2002:a17:902:a5cb:: with SMTP id t11-v6mr3425606plq.71.1533300319060; Fri, 03 Aug 2018 05:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533300319; cv=none; d=google.com; s=arc-20160816; b=SGIYi0Nfkra+cC0yqoT514Mov7VaJrfFfugLBfLbv7KaiIm//kEvhzEHrw3IfRhgGY rmLnscg4mygs9l0UQyHvHwK8NJcZJQpbu9j4mH8Wl2qSv7mSJcux5U8zTIOiyJcN+zpv icGpJlny0MG+yrZqoIVVKqLAmKeS/t74NRELtCk2uIBAlPOQBKd0T46ZPhcBLR+eMMCJ OhmEaTzvNzSRb0XzvU0kC3bUFp3e36v8dyE6d4GDgIXkcmqMk2hBfXkJcksi4bdRJWcu Bmw25QpPchoZIhw9E3jpMDfq3lYvJQngSQHIVCUntQfQvQoiYiu2B0Ol0QCEgbOj8tk1 Qc6g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Ag6fi/Yanuluap/Giso2WXJimhEj5pmJ9TndvnKbm/o=; b=gVKWtez3slPAtSDKjKR8o0aLcS0kYhDgUsikXfC9safj4oYdYpBfr3DCO0q2MQhslB VKeDLmHVknNf2/wzxMmozSqR+RSfaw6ecBq2TAFu+Mlyk06yajs8AhncOnW2D+3CbeL2 OptXX7ALc4rK4NlrdeC7DutJp+j0/Za70EV4egzpD3xENP5GJ6Xgw0FO+5gK6AdX279J veH7vkaOTAqEwrP3+/38H6Y1CklQZIn51VO/WfXgmEH/Q3UmqMsAyMlcAweo9VOGEbAk XvyZcaGcFkoHNaIiPQmsvckKEEh4oYg/aBiHRiTzqNqSfG0I4fr1Q9zE8X2wDcGLUrt/ H13A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=2BipiXw4; 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 d6-v6si4706805pgh.569.2018.08.03.05.45.03; Fri, 03 Aug 2018 05:45:19 -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=2BipiXw4; 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 S1729867AbeHCOkO (ORCPT + 99 others); Fri, 3 Aug 2018 10:40:14 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38832 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728226AbeHCOkO (ORCPT ); Fri, 3 Aug 2018 10:40:14 -0400 Received: by mail-lj1-f195.google.com with SMTP id p6-v6so4847890ljc.5 for ; Fri, 03 Aug 2018 05:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ag6fi/Yanuluap/Giso2WXJimhEj5pmJ9TndvnKbm/o=; b=2BipiXw4t63O5iUEr2JQtp56WB3JMLr8PZe7Gq86np+zw9davJn2lXAC7h8XD37NXs IgB1mvF1uXN1Feap7ZsghiuByYRim1IIalclishPImuK6LZBhZgFgCzDISbPKyPk86Z2 Sv9tRKsQj+/uVb1geoBayxnZ2OyXVlYmErUryxIEDb1lU7uqV58aGrH/WgvvHsF7WBHg vDZP9Z6CGbuRSLBaMjDaIrVAyzmet7Qij7ZVa4Q639dPx6DsnO/efTchHwed7yezcP1X /Y5/ItPXbIkDBqxsiCTds8FEeGWSsD9xNODg05MHk9tv16+N1GoO+yOspIL9SZJBcJuA QaSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ag6fi/Yanuluap/Giso2WXJimhEj5pmJ9TndvnKbm/o=; b=RLAos7U8aB6hI8uFYKZS9AxfXpxy9TkxEMPfjsJ4Tx8QUkjAAAJ8kgo7jz9LbG0XsM RRcSNiPo+4yW0zPlUnVbccgKmi9RsbORJe239LaBXCQdRSqgHZHt2X/5xL693CeVaZOK sl1g5TYflUEb3F3pAnHlKfAFNpcVRmeecCxmFuEsnZ+cWPR+F3ZQJaXtVOMnXxC9RQn/ slKXSAIooYQhZhf4XFm3WrNU7SEYojfa+ceMuWuWHpkrLhUnc2C8FtjBLz2KxDk2c2XW Cbqiih95J/mPey7Q+GRtaoh+5yzsTN+l5FWCO26aSJKyUBD0w84ZktiJiyK7iRFpWok2 Aksg== X-Gm-Message-State: AOUpUlHvOSnH+VaZhG40Z1Wzrh0R0f8k/MeMJDtP2rB2NjV0pgwxXQVQ +pRhTMlp2QQi52Q+qmhZzm8P5Rl4WzoQEg== X-Received: by 2002:a2e:5d1c:: with SMTP id r28-v6mr5276206ljb.89.1533300242024; Fri, 03 Aug 2018 05:44:02 -0700 (PDT) Received: from [192.168.0.10] (95-166-82-66-cable.dk.customer.tdc.net. [95.166.82.66]) by smtp.googlemail.com with ESMTPSA id r73-v6sm893108ljb.16.2018.08.03.05.44.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 05:44:00 -0700 (PDT) Subject: Re: [PATCH] lightnvm: move device L2P detection to core To: javier@cnexlabs.com Cc: igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, hans.holmberg@cnexlabs.com, hlitz@ucsc.edu, youngtack.jin@circuitblvd.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180803085449.3436-1-mb@lightnvm.io> <31319710-8A72-49DC-9CFA-521CA06843F3@cnexlabs.com> <9349be00-4d14-9b25-ed11-fb9244428d7f@lightnvm.io> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <56562d7c-8deb-4597-4274-5a55ec9327f7@lightnvm.io> Date: Fri, 3 Aug 2018 14:43:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2018 02:40 PM, Javier Gonzalez wrote: >> On 3 Aug 2018, at 14.37, Matias Bjørling wrote: >> >> On 08/03/2018 02:16 PM, Javier Gonzalez wrote: >>>> On 3 Aug 2018, at 10.54, Matias Bjørling wrote: >>>> >>>> A 1.2 device is able to manage the logical to physical mapping >>>> table internally or leave it to the host. >>>> >>>> A target only supports one of those approaches, and therefore must >>>> check on initialization. Move this check to core to avoid each target >>>> implement the check. >>>> >>>> Signed-off-by: Matias Bjørling >>>> --- >>> I see where you want to go with these changes, but the way targets are >>> layered on top of the LightNVM subsystem does not align with it. >>> LightNVM can support different OCSSD versions and capabilities, but that >>> does not mean that a target (e.g., pblk) does. The way I see it, core >>> should only check for (i) the drive to expose itself in a known revision >>> and (ii) the reported structures to be consistent. However, specific >>> functionality is not for core to check upo. >> >> Why try to initialize a target, if we already know that it is incompatible? > > Yes, that is my point. But the one who knows if the targets supports > something or not is the target, not the subsystem. Here, you are making > an assumption knowing the pblk requires the L2P on the host, but that > could change in the future... > I don't believe it can. It is not supported by the 2.0 specification. 1.2 is legacy. I understand this from the perspective when checking for un-even configurations using the geometry. But this is a spec incompatibility, which I don't think the target should care about.