From nobody Mon Jun 22 23:59:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6673DC433EF for ; Tue, 15 Mar 2022 09:56:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346877AbiCOJ5i (ORCPT ); Tue, 15 Mar 2022 05:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346872AbiCOJ5h (ORCPT ); Tue, 15 Mar 2022 05:57:37 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 517A72AF1 for ; Tue, 15 Mar 2022 02:56:25 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220315095623epoutp01c7fcf540127e8b47d611ab4f08d4a100~chVmOEZmP3155931559epoutp01y for ; Tue, 15 Mar 2022 09:56:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220315095623epoutp01c7fcf540127e8b47d611ab4f08d4a100~chVmOEZmP3155931559epoutp01y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1647338183; bh=27qY133tG6B7B64pRYJ8si0/GF15Kh+wuSUhkAsKFvk=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=ndlfi7CJadLyrhn9yBdnK/CoJxMpjxRRltGyuiOLH8cwq2enyDI90glvKh4QFx9nb qNjMPUTPlqIR3QpZARQdf3vLqVdETJ3hNEvzrATO3YEpRiElXjzfuEm1ypeT6u5u7l N5QZglFbPin3mcJrKRmGrPrPED+5vMJrf9Hbrwmg= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20220315095622epcas2p23063ecfe190cfd4a5d84e3f65a7d1d1b~chVloz4EJ1553415534epcas2p2o; Tue, 15 Mar 2022 09:56:22 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.90]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4KHphN1JlDz4x9QH; Tue, 15 Mar 2022 09:56:20 +0000 (GMT) X-AuditID: b6c32a46-bffff70000023ea8-64-623062bdc807 Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 98.F8.16040.DB260326; Tue, 15 Mar 2022 18:56:13 +0900 (KST) Mime-Version: 1.0 Subject: RE:(2) [PATCH v2] driver/nvme/host: Support duplicated nsid for the private ns Reply-To: sungup.moon@samsung.com Sender: Sungup Moon From: Sungup Moon To: "hch@lst.de" CC: "kbusch@kernel.org" , "axboe@fb.com" , "sagi@grimberg.me" , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20220315071230.GA2069@lst.de> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20220315095612epcms2p304482f5160ae91a120d719c88dbe368d@epcms2p3> Date: Tue, 15 Mar 2022 18:56:12 +0900 X-CMS-MailID: 20220315095612epcms2p304482f5160ae91a120d719c88dbe368d Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphk+LIzCtJLcpLzFFi42LZdljTTHdvkkGSwa+VEhb/9xxjs1i5+iiT xaRD1xgtLu+aw2Yxf9lTdot1r9+zOLB5TGx+x+5x/t5GFo9NqzrZPDYvqffYfbOB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8M4ZWZYvtQ5M cOjd5dPY3q3EUpyRaKjFXFScCADG1ZJtFwQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220314110545epcms2p4a227eac7c4652445050e70ee2350635d References: <20220315071230.GA2069@lst.de> <20220314110545epcms2p4a227eac7c4652445050e70ee2350635d@epcms2p4> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I'll answer your opinion. 1. ns_head leak issue I don't think that is leaked ns_head. Because although all ids and nsid are= same through all namespaces, each namespaces are indenpendent namespace and each= of that should have independent data structure. Duplicated nsid private namespace is different from the shared namespace ev= en though same information. 2. nvme_mpath_set_disk_name issue Yes, I also agree that subsystem-wide IDA is very important data. However, I implemented without nvme_mpath_set_disk_name modification at the first time= , it is hard to decide which namespace are connected to private controller. As you know, each nvme controller start initiating at a time. So, each cont= roller structures are sequentially initiated, but each namespaces structures are i= nitiated independently because of multi-processing on cpu. So, all namespace can hav= e different instance number every boot-up time, and it makes hard to track and control = the private namespace on the controller or device failure. Anyway, the private namespace is same condition with no-multipath situation= (because private namespace cannot shared between controllers) so I think that the pr= ivate namespace should follow the naming rule with no-multipath situation. =C2=A0 --------- Original Message --------- Sender : hch@lst.de=C2=A0 Date : 2022-03-15 16:12 (GMT+9) Title : Re: [PATCH v2] driver/nvme/host: Support duplicated nsid for the pr= ivate ns =C2=A0 I=C2=A0looked=C2=A0at=C2=A0this=C2=A0a=C2=A0bit=C2=A0more=C2=A0and=C2=A0fou= nd=C2=A0two=C2=A0issues: =C2=A0 =C2=A0-=C2=A0nvme_init_ns_head=C2=A0will=C2=A0now=C2=A0leak=C2=A0the=C2=A0n= s_head=C2=A0for=C2=A0the=C2=A0private=C2=A0namespaces =C2=A0=C2=A0=C2=A0with=C2=A0potentially=C2=A0duplicate=C2=A0IDs=C2=A0case. =C2=A0-=C2=A0nvme_mpath_set_disk_name=C2=A0still=C2=A0needs=C2=A0to=C2=A0us= e=C2=A0the=C2=A0subsystem-wide=C2=A0IDA =C2=A0=C2=A0=C2=A0for=C2=A0the=C2=A0nvme=C2=A0instance=C2=A0name=C2=A0as=C2= =A0the=C2=A0subsystem=C2=A0and=C2=A0controller=C2=A0ones =C2=A0=C2=A0=C2=A0could=C2=A0otherwise=C2=A0clash. =C2=A0 Let=C2=A0me=C2=A0know=C2=A0what=C2=A0you=C2=A0think=C2=A0of=C2=A0this=C2=A0= version: =C2=A0 --- From=C2=A01b217962cc10fa59eae98fc112adc64bddc462b3=C2=A0Mon=C2=A0Sep=C2=A01= 7=C2=A000:00:00=C2=A02001 From:=C2=A0Sungup=C2=A0Moon=C2=A0 Date:=C2=A0Mon,=C2=A014=C2=A0Mar=C2=A02022=C2=A020:05:45=C2=A0+0900 Subject:=C2=A0nvme:=C2=A0allow=C2=A0duplicated=C2=A0NSIDs=C2=A0for=C2=A0the= =C2=A0private=C2=A0namespaces =C2=A0 A=C2=A0NVMe=C2=A0subsystem=C2=A0with=C2=A0multiple=C2=A0controller=C2=A0can= =C2=A0have=C2=A0private=C2=A0namespaces that=C2=A0use=C2=A0the=C2=A0same=C2=A0NSID=C2=A0under=C2=A0some=C2=A0condit= ions: =C2=A0 =C2=A0"If=C2=A0Namespace=C2=A0Management,=C2=A0ANA=C2=A0Reporting,=C2=A0or= =C2=A0NVM=C2=A0Sets=C2=A0are=C2=A0supported,=C2=A0the =C2=A0=C2=A0NSIDs=C2=A0shall=C2=A0be=C2=A0unique=C2=A0within=C2=A0the=C2=A0= NVM=C2=A0subsystem.=C2=A0If=C2=A0the=C2=A0Namespace =C2=A0=C2=A0Management,=C2=A0ANA=C2=A0Reporting,=C2=A0and=C2=A0NVM=C2=A0Set= s=C2=A0are=C2=A0not=C2=A0supported,=C2=A0then=C2=A0NSIDs: =C2=A0=C2=A0=C2=A0a)=C2=A0for=C2=A0shared=C2=A0namespace=C2=A0shall=C2=A0be= =C2=A0unique;=C2=A0and =C2=A0=C2=A0=C2=A0b)=C2=A0for=C2=A0private=C2=A0namespace=C2=A0are=C2=A0not= =C2=A0required=C2=A0to=C2=A0be=C2=A0unique." =C2=A0 Reference:=C2=A0Section=C2=A06.1.6=C2=A0NSID=C2=A0and=C2=A0Namespace=C2=A0U= sage;=C2=A0NVM=C2=A0Express=C2=A01.4c=C2=A0spec. =C2=A0 Make=C2=A0sure=C2=A0this=C2=A0specific=C2=A0setup=C2=A0is=C2=A0supported=C2= =A0in=C2=A0Linux. =C2=A0 Signed-off-by:=C2=A0Sungup=C2=A0Moon=C2=A0 Signed-off-by:=C2=A0Christoph=C2=A0Hellwig=C2=A0 --- =C2=A0drivers/nvme/host/core.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0= =C2=A07=C2=A0++++++- =C2=A0drivers/nvme/host/multipath.c=C2=A0|=C2=A0=C2=A07=C2=A0++++--- =C2=A0drivers/nvme/host/nvme.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A019= =C2=A0+++++++++++++++++++ =C2=A0include/linux/nvme.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0|=C2=A0=C2=A01=C2=A0+ =C2=A04=C2=A0files=C2=A0changed,=C2=A030=C2=A0insertions(+),=C2=A04=C2=A0de= letions(-) =C2=A0 diff=C2=A0--git=C2=A0a/drivers/nvme/host/core.c=C2=A0b/drivers/nvme/host/co= re.c index=C2=A0f8084ded69e50..c7127d439b3de=C2=A0100644 ---=C2=A0a/drivers/nvme/host/core.c +++=C2=A0b/drivers/nvme/host/core.c @@=C2=A0-3657,7=C2=A0+3657,12=C2=A0@@=C2=A0static=C2=A0struct=C2=A0nvme_ns_= head=C2=A0*nvme_find_ns_head(struct=C2=A0nvme_subsystem=C2=A0*subsys, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0lockdep_assert_held(&= subsys->lock); =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0list_for_each_entry(h= ,=C2=A0&subsys->nsheads,=C2=A0entry)=C2=A0{ -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(h->ns_id=C2=A0!=3D=C2=A0nsid) +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0/* +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0Private=C2=A0namespaces=C2=A0can=C2=A0= share=C2=A0NSIDs=C2=A0under=C2=A0some=C2=A0conditions. +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0In=C2=A0that=C2=A0case=C2=A0we=C2=A0ca= n't=C2=A0use=C2=A0the=C2=A0same=C2=A0ns_head=C2=A0for=C2=A0namespaces +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0with=C2=A0the=C2=A0same=C2=A0NSID. +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*/ +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(h->ns_id=C2=A0!=3D=C2=A0nsid=C2=A0||=C2=A0= !nvme_is_uniqueue_nsid(ctrl,=C2=A0head)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= continue; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(!list_empty(&h->list)=C2=A0&&=C2=A0nvme= _tryget_ns_head(h)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return=C2=A0h; diff=C2=A0--git=C2=A0a/drivers/nvme/host/multipath.c=C2=A0b/drivers/nvme/ho= st/multipath.c index=C2=A0d13b81cd6225c..6b6df1016cb91=C2=A0100644 ---=C2=A0a/drivers/nvme/host/multipath.c +++=C2=A0b/drivers/nvme/host/multipath.c @@=C2=A0-504,10=C2=A0+504,11=C2=A0@@=C2=A0int=C2=A0nvme_mpath_alloc_disk(st= ruct=C2=A0nvme_ctrl=C2=A0*ctrl,=C2=A0struct=C2=A0nvme_ns_head=C2=A0*head) =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0Add=C2= =A0a=C2=A0multipath=C2=A0node=C2=A0if=C2=A0the=C2=A0subsystems=C2=A0support= s=C2=A0multiple=C2=A0controllers. -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0We=C2=A0also= =C2=A0do=C2=A0this=C2=A0for=C2=A0private=C2=A0namespaces=C2=A0as=C2=A0the= =C2=A0namespace=C2=A0sharing=C2=A0data=C2=A0could -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0change=C2=A0a= fter=C2=A0a=C2=A0rescan. +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0We=C2=A0also= =C2=A0do=C2=A0this=C2=A0for=C2=A0private=C2=A0namespaces=C2=A0as=C2=A0the= =C2=A0namespace=C2=A0sharing=C2=A0flag +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*=C2=A0could=C2=A0ch= ange=C2=A0after=C2=A0a=C2=A0rescan. =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*/ -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(!(ctrl->subsys->c= mic=C2=A0&=C2=A0NVME_CTRL_CMIC_MULTI_CTRL)=C2=A0||=C2=A0!multipath) +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(!(ctrl->subsys->c= mic=C2=A0&=C2=A0NVME_CTRL_CMIC_MULTI_CTRL)=C2=A0|| +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0!n= vme_is_uniqueue_nsid(ctrl,=C2=A0head)=C2=A0||=C2=A0!multipath) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0return=C2=A00; =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0head->disk=C2=A0=3D= =C2=A0blk_alloc_disk(ctrl->numa_node); diff=C2=A0--git=C2=A0a/drivers/nvme/host/nvme.h=C2=A0b/drivers/nvme/host/nv= me.h index=C2=A0587d92df118b7..9add586434929=C2=A0100644 ---=C2=A0a/drivers/nvme/host/nvme.h +++=C2=A0b/drivers/nvme/host/nvme.h @@=C2=A0-718,6=C2=A0+718,25=C2=A0@@=C2=A0static=C2=A0inline=C2=A0bool=C2=A0= nvme_check_ready(struct=C2=A0nvme_ctrl=C2=A0*ctrl,=C2=A0struct=C2=A0request= =C2=A0*rq, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0return=C2=A0queue_live; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return=C2=A0__nvme_ch= eck_ready(ctrl,=C2=A0rq,=C2=A0queue_live); =C2=A0} + +/* +=C2=A0*=C2=A0NSID=C2=A0shall=C2=A0be=C2=A0unique=C2=A0for=C2=A0all=C2=A0sh= ared=C2=A0namespaces,=C2=A0or=C2=A0if=C2=A0at=C2=A0least=C2=A0one=C2=A0of= =C2=A0the +=C2=A0*=C2=A0following=C2=A0conditions=C2=A0is=C2=A0met: +=C2=A0*=C2=A0=C2=A0=C2=A01.=C2=A0Namespace=C2=A0Management=C2=A0is=C2=A0su= pported=C2=A0by=C2=A0the=C2=A0controller +=C2=A0*=C2=A0=C2=A0=C2=A02.=C2=A0ANA=C2=A0is=C2=A0supported=C2=A0by=C2=A0t= he=C2=A0controller +=C2=A0*=C2=A0=C2=A0=C2=A03.=C2=A0NVM=C2=A0Set=C2=A0are=C2=A0supported=C2= =A0by=C2=A0the=C2=A0controller +=C2=A0* +=C2=A0*=C2=A0In=C2=A0other=C2=A0case,=C2=A0private=C2=A0namespace=C2=A0are= =C2=A0not=C2=A0required=C2=A0to=C2=A0report=C2=A0a=C2=A0unique=C2=A0NSID. +=C2=A0*/ +static=C2=A0inline=C2=A0bool=C2=A0nvme_is_uniqueue_nsid(struct=C2=A0nvme_c= trl=C2=A0*ctrl, +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0struct=C2=A0nvme_ns_head=C2=A0*head) +{ +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return=C2=A0head->shared= =C2=A0|| +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0(ctrl->oacs=C2=A0&=C2=A0NVME_CTRL_OACS_NS_MNGT_SUPP= )=C2=A0|| +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0(ctrl->subsys->cmic=C2=A0&=C2=A0NVME_CTRL_CMIC_ANA)= =C2=A0|| +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0(ctrl->ctratt=C2=A0&=C2=A0NVME_CTRL_CTRATT_NVM_SETS= ); +} + =C2=A0int=C2=A0nvme_submit_sync_cmd(struct=C2=A0request_queue=C2=A0*q,=C2= =A0struct=C2=A0nvme_command=C2=A0*cmd, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0void=C2=A0*buf,=C2=A0unsigned=C2=A0bufflen); =C2=A0int=C2=A0__nvme_submit_sync_cmd(struct=C2=A0request_queue=C2=A0*q,=C2= =A0struct=C2=A0nvme_command=C2=A0*cmd, diff=C2=A0--git=C2=A0a/include/linux/nvme.h=C2=A0b/include/linux/nvme.h index=C2=A09dbc3ef4daf7c..2dcee34d467d6=C2=A0100644 ---=C2=A0a/include/linux/nvme.h +++=C2=A0b/include/linux/nvme.h @@=C2=A0-345,6=C2=A0+345,7=C2=A0@@=C2=A0enum=C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NVME_CTRL_ONCS_TIMEST= AMP=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=3D=C2=A01=C2=A0<<=C2=A06, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NVME_CTRL_VWC_PRESENT= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D=C2= =A01=C2=A0<<=C2=A00, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NVME_CTRL_OACS_SEC_SU= PP=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D=C2=A01=C2=A0<<=C2=A00, +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0NVME_CTRL_OACS_NS_MNGT_SUP= P=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=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