Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp411094imm; Fri, 3 Aug 2018 05:38:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdqpgS+5q0vdef108CV/pHq5AZ9Y5brfNbDT07Zva0xDNnOcOhDg0D0c184tTbrThH9zhux X-Received: by 2002:a63:d946:: with SMTP id e6-v6mr3702022pgj.24.1533299935213; Fri, 03 Aug 2018 05:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533299935; cv=none; d=google.com; s=arc-20160816; b=GcOhljEMsD9iViOohOGRbyodQyj/mdYSL3qiyC9PR+EZ9XmiYgOgk6xgtdGkDSE3vA N5jvcc7noa9GMU2O1KNPCOUbw9ndwD/ZmwhmYO2olLHShwMo3ghJyPFGLCqsAK0k/BFt X8LwRFb07WCTfASOL4I4frVnC1oBb9OOaVevcu1TKtvAxVKvGr0dPEckJM5FIjVXpsU9 dpxpuGTpbxGNDmaYHMVSYOddUmgB25PEMs4cbVuyyIKsZdjpIEiYJXAp51G4skZxQynJ pGJMHmECXall6C1s58O+5NTMTy6gJZ17pX/f+9ZiAUnkjcHwP8woNtNjXX1BPH7jIBBk b9LA== 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=Gh6p0KJdfRQjsfA6TAi38fge0rfft8FJKDYZzw10xAw=; b=QM4n8Dhe3HTlFFw/cC5a/cAdliy5gtlkgS1ieV7iNdzatd5DD/uvAglZ3HBLY8P4lv RAHBWtGIM+9Im4JDwPMBo/FL6XnyVnNbL5noPzaoKkfS3d9MT5mYgifil4AFQn7YQmCu ybA6kq4mrd/d/8fY55BgyksMMw8VK3z0fd+79G/Ua2mw/SoZoQNE8xVv0TZmD1oGIeG1 W5XD+9e8kPl8ON+y06HMA8/Fw5qAGd5wTxz9cwmMdVoKbKiZXvWOUhqwsHjY+XQy/G+6 C/KnMx39dz/dlovwljkDkrWG1Iilg8xxvO50pfr7Pt5Unr1I5vo+alFVe+x1N9QuVUde RSJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=BL9qDU68; 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 g11-v6si3952014plb.323.2018.08.03.05.38.40; Fri, 03 Aug 2018 05:38:55 -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=BL9qDU68; 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 S1729603AbeHCOdy (ORCPT + 99 others); Fri, 3 Aug 2018 10:33:54 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37147 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728171AbeHCOdy (ORCPT ); Fri, 3 Aug 2018 10:33:54 -0400 Received: by mail-lf1-f68.google.com with SMTP id j8-v6so3946303lfb.4 for ; Fri, 03 Aug 2018 05:37:44 -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=Gh6p0KJdfRQjsfA6TAi38fge0rfft8FJKDYZzw10xAw=; b=BL9qDU68P1YF9126tMzmPMRcwDVjvvWMbQb8FlxH8j/H0iu1+xfNmdkWoiDtjuhBXi D4j5lC+35A4XFetrjfM0B3xHz0ZgSoU8mg8gEHKHcNPM1MeAqOIaF1jsRF5kqQBCQMIz kLFMyETA8+N/am6FeEdPCnR3g/xpClyFiqAkOg9eMgYp+B79peQ6p14mT+CvwtCAtdY6 si7U3IqmgXoDdJkp0Eh1OMl9lEXlK1yPiaot0squijmypLATTWpAOMxMFYsvJZuL9Mmt 0CB8E5NDllbB4upUq0ifyRuNrteNVfv6mRcafbF430zGAnJ1wKNiWj4UDK+BdCWte7jx 98Iw== 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=Gh6p0KJdfRQjsfA6TAi38fge0rfft8FJKDYZzw10xAw=; b=TNv19ny8k78hdRaZqOEcO9y0slJZvXYBcKYxTXg2fNsYgVzj7h5PU+BUYPzsNh09me xjqbxVhNQ7I5VwhPugtw1vDvJY1Srv4lwfMmCjuoudvZtyt2cpie+XEueCd9gDyH8+1Y Vd6WDcFW+xO8hDUWuQqU6tPu9QSa2NxyIEn0n4repFr9f0ZQoPtz/jpuBw0EEPBFyZfh 11+dM5QElFTH5M0O0FLbvroIfM+OOn+Hgti3VaHEqk2rTgdCnWje7SNkQARMNLOhj12g tFoIR+Ead2AjUzC9NuTH9hR+D7QIy3TWG09nWISChwq181N3p1HPNqgn9XzkxpdS7zIZ RGvQ== X-Gm-Message-State: AOUpUlFtLBPbKw0BPYwYTn4JYGxlHLJRbKKY1h3IUkkiky7I8172wsgH fWp7BUMN5lWCfCdfm/JmpgrxDJ5gSMaC+w== X-Received: by 2002:a19:c64c:: with SMTP id w73-v6mr4821247lff.2.1533299863408; Fri, 03 Aug 2018 05:37:43 -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 j17-v6sm706771lfb.27.2018.08.03.05.37.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 05:37:42 -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> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <9349be00-4d14-9b25-ed11-fb9244428d7f@lightnvm.io> Date: Fri, 3 Aug 2018 14:37:41 +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: <31319710-8A72-49DC-9CFA-521CA06843F3@cnexlabs.com> 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: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?