Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp437444imm; Fri, 3 Aug 2018 06:03:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfAR4Ci94olGOUsnz2xSJ44NbkPahe3qlrj1xL2PWJ9YhFEzTbUeFTPbyxZnPAwCPmOoFpo X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr3782158pgl.316.1533301383239; Fri, 03 Aug 2018 06:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533301383; cv=none; d=google.com; s=arc-20160816; b=Mfr1PP52NwiKqRVt/txaUbK1CfRR1yPgaBfH2Gw3HSu1nivyBVPhcAyHI+WCeyKWOu ZhPKZUeOQCjKeMpXLe7PfHggAyDtKtC7o3BB3vtJoAHtmv0gB5s0sI5MMvBuma5U7Tei VvF1Z+0B44xqAEYTSbe6g5UzExHpkqygwaf7sIIYhJQ3kqyYltJaz5mg1JJ2wuyqzx00 JkSDC2QctCTafMn19FozXcbbTqa76G6485yQy9zPBYVpuSK/H0ewDC6uXphXcoy5+Sg0 4PWw6YT36e0VQFtw5xmkvgDmRV6ebp+2OQNtDcdvo+1GjpzJQBezrzQ5p9Hzz1WLe3Pp tt6A== 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=yY+s+Wo21js7uwOR5v+juzGv4BB2CsnjQLGXB4wq2Bc=; b=LcFU2qUzc2YZ+jkEIvRcsXLG59DVz4dzFTi2X1sW/CxGFQX/vZ3ZlQW3lBH7M7w5og nn1vXAC7F64+Ma0uId//jM00eMqFrpCfrFgiApBeHTgRGua8mxZthJQUbbnsXxnizYpE 2nRDz6N9Edg3oHvTdaiSfppvxep8HU9YWsKCJtH7fz2fye2V4qcKy7+mEm94UekOkBUd Hs+K3VLuFfMAA2kWASUj4O78sIC+G7kTpnPDSBIKB9BtkI3wB+9LsbeOA0Xox+6bpjBu iHmk+VNhnO8bLztRkBFifH1jeRoTB5p+Wuq3hXRi+xWoFjAHRekKCwzlGnQRZrbJjK1K PpRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=XF1JdH7B; 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 b1-v6si3556860pld.396.2018.08.03.06.02.46; Fri, 03 Aug 2018 06:03:03 -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=XF1JdH7B; 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 S1731364AbeHCO5z (ORCPT + 99 others); Fri, 3 Aug 2018 10:57:55 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:34588 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729367AbeHCO5y (ORCPT ); Fri, 3 Aug 2018 10:57:54 -0400 Received: by mail-lf1-f65.google.com with SMTP id n96-v6so4018335lfi.1 for ; Fri, 03 Aug 2018 06:01:39 -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=yY+s+Wo21js7uwOR5v+juzGv4BB2CsnjQLGXB4wq2Bc=; b=XF1JdH7BAFloRql5wDrZhdPZwbHMvr8BuOvmX/wbFJulF+dLGfH5gDxNbpInpcyw0Y jH7u4EcOHbxlZpLlE4oTudRRZdJl2ejfZZoX9HvOnj01kNxR98I1GZmBycO4NIOx0NdE JkYAGOKtb2rfJcZyoun6JwqkZtK7S78lHvtzgiviqHPT/ot0w3SJZ904MAMvVWEj8JiR mdlND5i1ENL9oSXB9VTNTEIlmheTnAQuXNmc689asRdTg1GB48eQ0f9v4NofHSvraPy1 H7ss99hBVtNvyOrmDEPYSBDMoizbPVqDpyjQDfvUmz0PT6nz9xUhWRSXot4tcgor+S5d baxg== 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=yY+s+Wo21js7uwOR5v+juzGv4BB2CsnjQLGXB4wq2Bc=; b=K9vQW6UnXXUaJy6bWJaW8J9RcyTDYnw9X/RefO1GhJ/eB9jUCiSjrmFJVZezEF/7Q5 spVdzak02b7vZ/IuXz9p79fK7We2hM4GIpBEbQx4ZuMYGSBrZANrbBUGLFLLQPH51CfC yEUiNnn3i6HZNfnXdC/Oy854qzXvN9/6iKUTxJhAfHKpOjvqTeJ6kETjAt7/XBcvzoRR jy04isHiAUI4vfMorDrhuxRwb6i15usCPJ3mIMwc+8z2ed67W3dl9a0V1QUzIS9kjT2k ABXgPxVVsjpLi0s/WD7eUqwRPTa9D/g+5Df2uWNeXjXF7K0IU5t+zDJqTldhRaHTgQAm XJ5Q== X-Gm-Message-State: AOUpUlFvSaXb15A6wxOun5aavgK624MFCUylur35FdG8tS89M/XTGhzR oz5ygGg67NMmgjE02dweYjSqUGC/3Uo= X-Received: by 2002:ac2:418b:: with SMTP id z11-v6mr4865880lfh.3.1533301298245; Fri, 03 Aug 2018 06:01:38 -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 d13-v6sm707590lfi.74.2018.08.03.06.01.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 06:01:36 -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> <56562d7c-8deb-4597-4274-5a55ec9327f7@lightnvm.io> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: Date: Fri, 3 Aug 2018 15:01:35 +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:55 PM, Javier Gonzalez wrote: >> On 3 Aug 2018, at 14.43, Matias Bjørling wrote: >> >> 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. >> > > Ja... We both know that people is using 1.2 variants out there... Yes, I'm not saying that. I'm saying the spec 1.2 has been deprecated by 2.0 and no longer developed, and I'm not going to move that brainfart into the 2.0 spec :) > >> 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. > > I see the point of not having this check in pblk since we know that we > are moving towards 2.0 and leaving 1.2 as legacy/not-upstream. But does > it really make sense to fail LightNVM on a 1.2 capability that is spec. > compliant? For all we know people could have this and use it from user > space or through an internal target. > It only fails on target creation, not on disk initialization. The disk will be up so user-space and targets that implements. Is that a problem?