Received: by 10.223.185.116 with SMTP id b49csp3445862wrg; Sun, 18 Feb 2018 23:28:15 -0800 (PST) X-Google-Smtp-Source: AH8x225h97spnLBg4vyPpu6Cb4N9iFaf9IYwi2lXaOMgr1dN4YRMQq++4s6WWbHgpRRFM10xYJgY X-Received: by 10.101.68.141 with SMTP id l13mr11437804pgq.65.1519025295342; Sun, 18 Feb 2018 23:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519025295; cv=none; d=google.com; s=arc-20160816; b=PUEVZiILKE34I71MvskSJ252VX2c6V59SUi8HuGpebEtzB3vGv4hjSt0JzvJK1C3A0 iyc1Jxr6YnBgaue1F8b+rEQesU5Z46HoXiUFC79bu5mx4QiILpkS33qlTk1CXuGsXVdH rgUxu2nxyrrLCFalxNMq6U5fLU+xSngoHD7PsFWDQPIxxNWREY1HGEiLc3Z3lUv57ISJ 5CbCgtIFgX2EHc2coJ1OVzZn7IQJXzUFUpkuPtRCVT1c44y0vQzstHoXPY9tNyzOI8VF TbsuwuFfW10oJWMkR24KGdofVEpTFqDQAyNdX5noKWJm7vpD5X6nz0BC6Mka7gU6oeQu d5Fg== 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=RW1Nnmw+n7iC00n4OEv4G1X47y35okRZjx2ePUHfozM=; b=atgkyb/IZFens8nRdm/0LLtzFmFHxz6m5kttK2ZC7ikTpk2enxh/bmUDBojd6VLxMC ZIe/w4LQXM50zuLmh6/0TxFRR/hTvFUw3hYw/UbZDxDuu6nnb/2xDZp1B4gFjmfWpgb1 adPh5CO3kDIlh7tokf0AubpzHHf/TikAaJDLzSYWqQzyLc4Rohuk/Yx1aEXHQkaLmTSm 2aIkMHudosTMMhvNm6KgkVFV0TuItccbVijulUyM2DPxCUHNYWSJHIFvp6BqIAWh5Q40 ZPJZ9j16LkK7wcfLeRNi55sLDXhdH1te8A5VIwaIvujG3pEXY6T+leSIqVHo4UymM8G3 sTfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=hwUqIl4x; 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 s190si3491821pgc.510.2018.02.18.23.28.00; Sun, 18 Feb 2018 23:28:15 -0800 (PST) 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=hwUqIl4x; 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 S1752056AbeBSH1P (ORCPT + 99 others); Mon, 19 Feb 2018 02:27:15 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:44841 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbeBSH1N (ORCPT ); Mon, 19 Feb 2018 02:27:13 -0500 Received: by mail-lf0-f66.google.com with SMTP id v9so9696465lfa.11 for ; Sun, 18 Feb 2018 23:27:06 -0800 (PST) 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=RW1Nnmw+n7iC00n4OEv4G1X47y35okRZjx2ePUHfozM=; b=hwUqIl4xnvX3pXfj/gywpFvxgO8dRr3LO2NCW0YIhePXmm5AGwgbCSI0EDIJdO1VL5 OAHvF8Wb3ici2G1Zaew8DNRm+dQaZfjWfcmwn+m8WodnkioGBu2bqqeTAFHeIVdNk/+D S+Cv/lN8kGFmK7d+KsE4ME1uZXqZdLXt8a8REu1GtO6j+kP+shfOrprH8T9eBpaJypZo 3uCmZsdYNmYMBCbelT/gmStVakSawF/ls3Ipoxz/vbpvZ1mgvX610Dp61dt56JJW+wUB uQ3MrUH9YltYyD0JUl1b4UOaHtHSxkjev1vfLABqA3FY6nhsGDkek55KPxYzz6ZwXHb4 KU8g== 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=RW1Nnmw+n7iC00n4OEv4G1X47y35okRZjx2ePUHfozM=; b=N1DRyEI2zW5H5bBWwy3eGGWqLptlb8Y4nfReeAoAGu5uk5DomsN93XX4mrWtsKw5VG GgAwvOcSxUp86/R2d3d69EHQsD0qUpyptOrogiCAY5Z4WFrmeLV8vSxr32cJxxq9OhAq J3QO1sjA+Y92008o4lXxlot4Z164NqEwI3xXHJ5wn/VTFT4xw+w3NPncpkWVugLp6DU2 z7YXzLKTiqYH1Slcbp5UQYHYYUVLfKUw5gneRyyPBIJOQzhjdqM6N8RBN+C0hFgPncd4 IIY8jzZQEIj2RKE+jrgHZ39P9s8Qb5saVEoOh1uTpZ0Jg0ms32yCGHDoGY40ZB6VfZVc nBjw== X-Gm-Message-State: APf1xPAZ29JXd2OuPcxdM+uXIlkA0vOj2xfPVxXVVlS6Y3JAHCm90tbJ 7hY4Xc8Bub+1zNy49GVCpUUgJM28 X-Received: by 10.46.85.17 with SMTP id j17mr9785126ljb.55.1519025225792; Sun, 18 Feb 2018 23:27:05 -0800 (PST) Received: from [192.168.0.10] (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.googlemail.com with ESMTPSA id s7sm2178463lfg.13.2018.02.18.23.27.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Feb 2018 23:27:04 -0800 (PST) Subject: Re: [PATCH 2/8] lightnvm: show generic geometry in sysfs To: Javier Gonzalez Cc: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" References: <1518530768-20956-1-git-send-email-javier@cnexlabs.com> <1518530768-20956-3-git-send-email-javier@cnexlabs.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: Date: Mon, 19 Feb 2018 08:27:03 +0100 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 02/16/2018 07:35 AM, Javier Gonzalez wrote: > >> On 15 Feb 2018, at 02.20, Matias Bjørling wrote: >> >> On 02/13/2018 03:06 PM, Javier González wrote: >>> From: Javier González >>> Apart from showing the geometry returned by the different identify >>> commands, provide the generic geometry too, as this is the geometry that >>> targets will use to describe the device. >>> Signed-off-by: Javier González >>> --- >>> drivers/nvme/host/lightnvm.c | 146 ++++++++++++++++++++++++++++--------------- >>> 1 file changed, 97 insertions(+), 49 deletions(-) >>> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c >>> index 97739e668602..7bc75182c723 100644 >>> --- a/drivers/nvme/host/lightnvm.c >>> +++ b/drivers/nvme/host/lightnvm.c >>> @@ -944,8 +944,27 @@ static ssize_t nvm_dev_attr_show(struct device *dev, >>> return scnprintf(page, PAGE_SIZE, "%u.%u\n", >>> dev_geo->major_ver_id, >>> dev_geo->minor_ver_id); >>> - } else if (strcmp(attr->name, "capabilities") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.cap); >>> + } else if (strcmp(attr->name, "clba") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.clba); >>> + } else if (strcmp(attr->name, "csecs") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.csecs); >>> + } else if (strcmp(attr->name, "sos") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.sos); >>> + } else if (strcmp(attr->name, "ws_min") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_min); >>> + } else if (strcmp(attr->name, "ws_opt") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_opt); >>> + } else if (strcmp(attr->name, "maxoc") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.maxoc); >>> + } else if (strcmp(attr->name, "maxocpu") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.maxocpu); >>> + } else if (strcmp(attr->name, "mw_cunits") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mw_cunits); >>> + } else if (strcmp(attr->name, "media_capabilities") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mccap); >>> + } else if (strcmp(attr->name, "max_phys_secs") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", >>> + ndev->ops->max_phys_sect); >>> } else if (strcmp(attr->name, "read_typ") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.trdt); >>> } else if (strcmp(attr->name, "read_max") == 0) { >>> @@ -984,19 +1003,8 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, >>> attr = &dattr->attr; >>> - if (strcmp(attr->name, "vendor_opcode") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.vmnt); >>> - } else if (strcmp(attr->name, "device_mode") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.dom); >>> - /* kept for compatibility */ >>> - } else if (strcmp(attr->name, "media_manager") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%s\n", "gennvm"); >>> - } else if (strcmp(attr->name, "ppa_format") == 0) { >>> + if (strcmp(attr->name, "ppa_format") == 0) { >>> return nvm_dev_attr_show_ppaf((void *)&dev_geo->c.addrf, page); >>> - } else if (strcmp(attr->name, "media_type") == 0) { /* u8 */ >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mtype); >>> - } else if (strcmp(attr->name, "flash_media_type") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.fmtype); >>> } else if (strcmp(attr->name, "num_channels") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->num_ch); >>> } else if (strcmp(attr->name, "num_luns") == 0) { >>> @@ -1011,8 +1019,6 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.fpg_sz); >>> } else if (strcmp(attr->name, "hw_sector_size") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.csecs); >>> - } else if (strcmp(attr->name, "oob_sector_size") == 0) {/* u32 */ >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.sos); >>> } else if (strcmp(attr->name, "prog_typ") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.tprt); >>> } else if (strcmp(attr->name, "prog_max") == 0) { >>> @@ -1021,13 +1027,21 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.tbet); >>> } else if (strcmp(attr->name, "erase_max") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.tbem); >>> + } else if (strcmp(attr->name, "vendor_opcode") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.vmnt); >>> + } else if (strcmp(attr->name, "device_mode") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.dom); >>> + /* kept for compatibility */ >>> + } else if (strcmp(attr->name, "media_manager") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%s\n", "gennvm"); >>> + } else if (strcmp(attr->name, "capabilities") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.cap); >>> + } else if (strcmp(attr->name, "media_type") == 0) { /* u8 */ >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mtype); >>> + } else if (strcmp(attr->name, "flash_media_type") == 0) { >>> + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.fmtype); >>> } else if (strcmp(attr->name, "multiplane_modes") == 0) { >>> return scnprintf(page, PAGE_SIZE, "0x%08x\n", dev_geo->c.mpos); >>> - } else if (strcmp(attr->name, "media_capabilities") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "0x%08x\n", dev_geo->c.mccap); >>> - } else if (strcmp(attr->name, "max_phys_secs") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", >>> - ndev->ops->max_phys_sect); >>> } else { >>> return scnprintf(page, PAGE_SIZE, >>> "Unhandled attr(%s) in `nvm_dev_attr_show_12`\n", >>> @@ -1035,6 +1049,17 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, >>> } >>> } >>> +static ssize_t nvm_dev_attr_show_lbaf(struct nvm_addr_format *lbaf, >>> + char *page) >>> +{ >>> + return scnprintf(page, PAGE_SIZE, >>> + "0x%02x%02x%02x%02x%02x%02x%02x%02x\n", >>> + lbaf->ch_offset, lbaf->ch_len, >>> + lbaf->lun_offset, lbaf->lun_len, >>> + lbaf->chk_offset, lbaf->chk_len, >>> + lbaf->sec_offset, lbaf->sec_len); >>> +} >>> + >>> static ssize_t nvm_dev_attr_show_20(struct device *dev, >>> struct device_attribute *dattr, char *page) >>> { >>> @@ -1048,20 +1073,14 @@ static ssize_t nvm_dev_attr_show_20(struct device *dev, >>> attr = &dattr->attr; >>> - if (strcmp(attr->name, "groups") == 0) { >>> + if (strcmp(attr->name, "lba_format") == 0) { >>> + return nvm_dev_attr_show_lbaf((void *)&dev_geo->c.addrf, page); >>> + } else if (strcmp(attr->name, "groups") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->num_ch); >>> } else if (strcmp(attr->name, "punits") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->num_lun); >>> } else if (strcmp(attr->name, "chunks") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.num_chk); >>> - } else if (strcmp(attr->name, "clba") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.clba); >>> - } else if (strcmp(attr->name, "ws_min") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_min); >>> - } else if (strcmp(attr->name, "ws_opt") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_opt); >>> - } else if (strcmp(attr->name, "mw_cunits") == 0) { >>> - return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mw_cunits); >>> } else if (strcmp(attr->name, "write_typ") == 0) { >>> return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.tprt); >>> } else if (strcmp(attr->name, "write_max") == 0) { >>> @@ -1086,7 +1105,19 @@ static ssize_t nvm_dev_attr_show_20(struct device *dev, >>> /* general attributes */ >>> static NVM_DEV_ATTR_RO(version); >>> -static NVM_DEV_ATTR_RO(capabilities); >>> + >>> +static NVM_DEV_ATTR_RO(ws_min); >>> +static NVM_DEV_ATTR_RO(ws_opt); >>> +static NVM_DEV_ATTR_RO(mw_cunits); >>> +static NVM_DEV_ATTR_RO(maxoc); >>> +static NVM_DEV_ATTR_RO(maxocpu); >>> + >>> +static NVM_DEV_ATTR_RO(media_capabilities); >>> +static NVM_DEV_ATTR_RO(max_phys_secs); >>> + >>> +static NVM_DEV_ATTR_RO(clba); >>> +static NVM_DEV_ATTR_RO(csecs); >>> +static NVM_DEV_ATTR_RO(sos); >>> static NVM_DEV_ATTR_RO(read_typ); >>> static NVM_DEV_ATTR_RO(read_max); >>> @@ -1105,42 +1136,53 @@ static NVM_DEV_ATTR_12_RO(num_blocks); >>> static NVM_DEV_ATTR_12_RO(num_pages); >>> static NVM_DEV_ATTR_12_RO(page_size); >>> static NVM_DEV_ATTR_12_RO(hw_sector_size); >>> -static NVM_DEV_ATTR_12_RO(oob_sector_size); >>> static NVM_DEV_ATTR_12_RO(prog_typ); >>> static NVM_DEV_ATTR_12_RO(prog_max); >>> static NVM_DEV_ATTR_12_RO(erase_typ); >>> static NVM_DEV_ATTR_12_RO(erase_max); >>> static NVM_DEV_ATTR_12_RO(multiplane_modes); >>> -static NVM_DEV_ATTR_12_RO(media_capabilities); >>> -static NVM_DEV_ATTR_12_RO(max_phys_secs); >>> +static NVM_DEV_ATTR_12_RO(capabilities); >>> static struct attribute *nvm_dev_attrs_12[] = { >>> &dev_attr_version.attr, >>> - &dev_attr_capabilities.attr, >>> - >>> - &dev_attr_vendor_opcode.attr, >>> - &dev_attr_device_mode.attr, >>> - &dev_attr_media_manager.attr, >>> &dev_attr_ppa_format.attr, >>> - &dev_attr_media_type.attr, >>> - &dev_attr_flash_media_type.attr, >>> + >>> &dev_attr_num_channels.attr, >>> &dev_attr_num_luns.attr, >>> &dev_attr_num_planes.attr, >>> &dev_attr_num_blocks.attr, >>> &dev_attr_num_pages.attr, >>> &dev_attr_page_size.attr, >>> + >>> &dev_attr_hw_sector_size.attr, >>> - &dev_attr_oob_sector_size.attr, >>> + >>> + &dev_attr_clba.attr, >>> + &dev_attr_csecs.attr, >>> + &dev_attr_sos.attr, >>> + >>> + &dev_attr_ws_min.attr, >>> + &dev_attr_ws_opt.attr, >>> + &dev_attr_maxoc.attr, >>> + &dev_attr_maxocpu.attr, >>> + &dev_attr_mw_cunits.attr, >>> + >>> + &dev_attr_media_capabilities.attr, >>> + &dev_attr_max_phys_secs.attr, >>> + >> >> This breaks user-space. The intention is for user-space to decide >> based on version id. Then it can either retrieve the 1.2 or 2.0 >> attributes. The 2.0 attributes should not be available when a device >> is 1.2. >> > > Why does it break it? I'm only adding new entries. > > The objective is to expose the genneric geometry, since this is the > structure that is passed on to the targets. Since some of the values are > calculated, there is value on exposing this information, I believe. > > Another way of doing it, is adding the generic geometry at the target > level, showing what base values it is getting, including the real number > of channels/groups and luns/pus. > > Would this be better in your opinion? > No. It should be one set of attributes for 1.2 (keep the way it is today), and then separate 2.0 attributes. User-space should then identify either by either 1 or 2 in the version attribute. > >>> &dev_attr_read_typ.attr, >>> &dev_attr_read_max.attr, >>> &dev_attr_prog_typ.attr, >>> &dev_attr_prog_max.attr, >>> &dev_attr_erase_typ.attr, >>> &dev_attr_erase_max.attr, >>> + >>> + &dev_attr_vendor_opcode.attr, >>> + &dev_attr_device_mode.attr, >>> + &dev_attr_media_manager.attr, >>> + &dev_attr_capabilities.attr, >>> + &dev_attr_media_type.attr, >>> + &dev_attr_flash_media_type.attr, >>> &dev_attr_multiplane_modes.attr, >>> - &dev_attr_media_capabilities.attr, >>> - &dev_attr_max_phys_secs.attr, >>> NULL, >>> }; >>> @@ -1152,12 +1194,9 @@ static const struct attribute_group nvm_dev_attr_group_12 = { >>> /* 2.0 values */ >>> static NVM_DEV_ATTR_20_RO(groups); >>> +static NVM_DEV_ATTR_20_RO(lba_format); >>> static NVM_DEV_ATTR_20_RO(punits); >>> static NVM_DEV_ATTR_20_RO(chunks); >>> -static NVM_DEV_ATTR_20_RO(clba); >>> -static NVM_DEV_ATTR_20_RO(ws_min); >>> -static NVM_DEV_ATTR_20_RO(ws_opt); >>> -static NVM_DEV_ATTR_20_RO(mw_cunits); >>> static NVM_DEV_ATTR_20_RO(write_typ); >>> static NVM_DEV_ATTR_20_RO(write_max); >>> static NVM_DEV_ATTR_20_RO(reset_typ); >>> @@ -1165,16 +1204,25 @@ static NVM_DEV_ATTR_20_RO(reset_max); >>> static struct attribute *nvm_dev_attrs_20[] = { >>> &dev_attr_version.attr, >>> - &dev_attr_capabilities.attr, >>> + &dev_attr_lba_format.attr, >>> &dev_attr_groups.attr, >>> &dev_attr_punits.attr, >>> &dev_attr_chunks.attr, >>> + >>> &dev_attr_clba.attr, >>> + &dev_attr_csecs.attr, >>> + &dev_attr_sos.attr, >> >> csecs and sos are derived from the the generic block device data structures. > > As mentioned above, it is to represent the generic geometry. They are not part of the 2.0 spec. The fields can be derived from elsewhere. > >> >>> + >>> &dev_attr_ws_min.attr, >>> &dev_attr_ws_opt.attr, >>> + &dev_attr_maxoc.attr, >>> + &dev_attr_maxocpu.attr, >> >> When the maxoc/maxocpu are in another patch, these changes can be included. > > ok. > >> >>> &dev_attr_mw_cunits.attr, >>> + &dev_attr_media_capabilities.attr, >> >> What is the meaning of media in this context? The 2.0 spec defines >> vector copy and double resets in its capabilities, it does not have >> media in mind. >> > > It refers to the mcap (vector copy and double resets for now, as you > mention). I kept the name, name, but I can rename it if it is better... > >>> + &dev_attr_max_phys_secs.attr, >>> + >> >> I kill max_phys_secs in another patch. It has been made redundant >> after null_blk has been removed. > > I'll answer this on the patch - I have a questions here. > >>> &dev_attr_read_typ.attr, >>> &dev_attr_read_max.attr, >>> &dev_attr_write_typ.attr, > > Javier >