Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp112558ybd; Tue, 25 Jun 2019 17:43:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqynhdMVsIHw2odxSArXOU22kRBISf66IsT+PzfNDir53SwiCIF643Wnu+oFH9CUqfhtzQ28 X-Received: by 2002:a17:902:6a88:: with SMTP id n8mr1754342plk.70.1561509808254; Tue, 25 Jun 2019 17:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561509808; cv=none; d=google.com; s=arc-20160816; b=rSqvOfDPBp4p35pRiPg6YhgPKRfA53ElYL7Ata77RH78cqBf225ck4uEFNvKQGZiR9 ESAR7fqpdn75oRGLeoPozwfa9/LvniQNo2Mvp27t2VtQaw/pvJ9G+hTQkvTBRwahdonY VYiF15frI/0bEdWxU0Cvi8hv95JTVKCVzA5dA0QPshNZ1YtVEzZjRLoYzHNWIt2mtWgB 5mxocPHzeeox8Qi0WIGqGwybAXs/ibNEg1LSCqeJpiV2ocSrmtEDJRoP5/Bk9EiJWD2q j3LiPf/eSlm5y3ULL3cCPN7+xhN25a54mFwUWAY3jUAagAIvKuihMN2RbY8ZUZt0LszU 4N1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:dkim-signature; bh=TerptpOsnKzNbiPdKKm/mSwBbelgQmCue9kffTcmSZ0=; b=LWapOFnae0a6gdUEJW4b4vcXDfNtYIGpDl+2we8x/mLvMEDgY0PFSSzTW/yIMNodW0 V+JClkSqDa3nYvRw73o5iLqdR5GKh47XlsWe5Zheri7wn3XyN2y4Q8df4i4J6MEG3sxj dP+fccA8Tkm9U695vmNfPc5Ap/t9wOjsPWDjby+rNHwj1kQ5TXixwBfu1RVp6O5rN9w7 okCMxtw9DI1KKqDG72i0iBlXgo0JMORPlt3UcQl5mX2LuYVJra4blj1feAyF3VwtKUYk G0W+GsaznEvwiigg6RH8BYZhg53fLq+eDAIrjJfJ4i+QQeMguDGlV6xzJo6wqrEsqVSC nH8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=rdabUBC4; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=ThPin5BA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si9819395pge.235.2019.06.25.17.43.12; Tue, 25 Jun 2019 17:43:28 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=rdabUBC4; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=ThPin5BA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbfFZAmp (ORCPT + 99 others); Tue, 25 Jun 2019 20:42:45 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:16562 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbfFZAmo (ORCPT ); Tue, 25 Jun 2019 20:42:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1561509764; x=1593045764; h=from:to:cc:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=TerptpOsnKzNbiPdKKm/mSwBbelgQmCue9kffTcmSZ0=; b=rdabUBC46u/WRGA6DhBSyLd3s7Tt8z07gNYnrijAcZ6npaDc4v8sCqb+ bZvI+17P7Q8rJTgZNiEiGHP9p+g4pKXJaaLH4QvA1w3p0s7e+jw/SFc3G JCN3nf/oPnbymd/MhJmlnu3GUlGF00n8cqLKP/QgDsmzGyj+WanxWMBmB 1QjYHvOsavGXJ220stZa1nLYuW32uFPp0js5d4iJgSlDBKSF+5cdQ37Dk jGoSUltkSQ+406/UhOwIvwM8sBq8+3cFRDajS1tYu63ErTs6uDwVCQF9W 5g0O69B0HvOjkh6tEYzlwhUgLRNLCPEUGfdmn0C6g37aoBsNth3LqilYo g==; X-IronPort-AV: E=Sophos;i="5.63,417,1557158400"; d="scan'208";a="111534523" Received: from mail-dm3nam03lp2052.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([104.47.41.52]) by ob1.hgst.iphmx.com with ESMTP; 26 Jun 2019 08:42:42 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TerptpOsnKzNbiPdKKm/mSwBbelgQmCue9kffTcmSZ0=; b=ThPin5BAblTxqTWIgfdnmnYEnSwOLE8CtN7YAH+kaercuiyd2CW14p91PIf4lM++PFHmm4ug4wOwnl5UhqjO2yQ20TfiKjJ9Dm/Ty6trEntuCwVbN6oddQmYEFsKVKvvoq/oyxtk8wiuDzBVD36jYgyBVEGhXuPKyvgl/alUg74= Received: from BYAPR04MB5816.namprd04.prod.outlook.com (20.179.58.207) by BYAPR04MB5367.namprd04.prod.outlook.com (20.178.50.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Wed, 26 Jun 2019 00:42:40 +0000 Received: from BYAPR04MB5816.namprd04.prod.outlook.com ([fe80::e94e:8ead:40b1:fae6]) by BYAPR04MB5816.namprd04.prod.outlook.com ([fe80::e94e:8ead:40b1:fae6%7]) with mapi id 15.20.2008.017; Wed, 26 Jun 2019 00:42:40 +0000 From: Damien Le Moal To: Bart Van Assche , =?iso-8859-1?Q?Matias_Bj=F8rling?= , Chaitanya Kulkarni , "axboe@fb.com" , "hch@lst.de" , Dmitry Fomichev , Ajay Joshi , Aravind Ramesh , "martin.petersen@oracle.com" , "James.Bottomley@HansenPartnership.com" , "agk@redhat.com" , "snitzer@redhat.com" CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "dm-devel@redhat.com" , Matias Bjorling Subject: Re: [PATCH 1/4] block: add zone open, close and finish support Thread-Topic: [PATCH 1/4] block: add zone open, close and finish support Thread-Index: AQHVKDJPztuCEJ+OF0q7RsgYaqLWMQ== Date: Wed, 26 Jun 2019 00:42:40 +0000 Message-ID: References: <20190621130711.21986-1-mb@lightnvm.io> <20190621130711.21986-2-mb@lightnvm.io> <79ca395d-8019-9ec8-0c0b-194ca6d9eda0@acm.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@wdc.com; x-originating-ip: [199.255.47.12] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c13c9e4f-5522-4ce3-d180-08d6f9cf31bb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:BYAPR04MB5367; x-ms-traffictypediagnostic: BYAPR04MB5367: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:949; x-forefront-prvs: 00808B16F3 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(396003)(136003)(376002)(346002)(39860400002)(199004)(189003)(26005)(14444005)(4326008)(229853002)(6246003)(7736002)(33656002)(52536014)(72206003)(14454004)(256004)(6436002)(7696005)(53936002)(81156014)(2501003)(110136005)(81166006)(5660300002)(53546011)(66476007)(66446008)(64756008)(66556008)(76116006)(99286004)(74316002)(66946007)(73956011)(76176011)(91956017)(6506007)(186003)(478600001)(486006)(102836004)(66574012)(66066001)(305945005)(2906002)(476003)(55016002)(54906003)(8936002)(8676002)(316002)(9686003)(446003)(3846002)(71190400001)(71200400001)(7416002)(6116002)(2201001)(86362001)(68736007)(25786009)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR04MB5367;H:BYAPR04MB5816.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lRHTQDJ7Uk4HSzjOGfd8y6+C4tQy3ZjmtLrF3gWLqZUTEH2tDqOuy7rq8YlkbKgzwEDt8SzowetPm9Cmq92D94RufEZbLAhVD4TbxaNHyEinDrGvsfBRG/NELmkbO4cnyb5/ceslXdBdXKVOwH1T9V9pwhapE7lPR9G/fNE3a/xVMssex7b2p9es2u5pA2xB5NkP7g/n2G5fQ9CZAu/o93kFk0gcFg4pPhSlgpTMKlZd3in2MYgyYmiIvORus+r0gqkklw2C4ff/5vh3I0Fk7Zj0K2L+JVda1tTLCPy2O3eVUUHV2VPcUlZaYfWWTxknsrRFqu6B666JaKLFzuMyKF8OCN99uvMex62qguU/mzb2gVbqpVn0IvZwpPMiSCDaygdbzloS4KyMW0ipvtnzSh3ZVNzdBm1vZN/0KKviX6A= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: c13c9e4f-5522-4ce3-d180-08d6f9cf31bb X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2019 00:42:40.4874 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Damien.LeMoal@wdc.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB5367 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/06/26 0:56, Bart Van Assche wrote:=0A= > On 6/25/19 3:35 AM, Matias Bj=F8rling wrote:=0A= >> On 6/25/19 12:27 AM, Chaitanya Kulkarni wrote:=0A= >>> On 6/24/19 12:43 PM, Bart Van Assche wrote:=0A= >>>> static inline bool op_is_write(unsigned int op)=0A= >>>> {=0A= >>>> =A0=A0=A0=A0return (op & 1);=0A= >>>> }=0A= >>>>=0A= >>>=0A= >>=0A= >> The zone mgmt commands are neither write nor reads commands. I guess, = =0A= >> one could characterize them as write commands, but they don't write any = =0A= >> data, they update a state of a zone on a drive. One should keep it as = =0A= >> is? and make sure the zone mgmt commands don't get categorized as either= =0A= >> read/write.=0A= > =0A= > Since the open, close and finish operations support modifying zone data = =0A= > I propose to characterize these as write commands. How about the =0A= > following additional changes:=0A= > - Make bio_check_ro() refuse open/close/flush/reset zone operations for = =0A= > read-only partitions (see also commit a32e236eb93e ("Partially revert =0A= > "block: fail op_is_write() requests to read-only partitions"") # v4.18).= =0A= > - In submit_bio(), change op_is_write(bio_op(bio)) ? "WRITE" : "READ" =0A= > into something that uses blk_op_str().=0A= > - Add open/close/flush zone support be added in blk_partition_remap().=0A= =0A= Sounds good to me. And indeed, all operations should be failed for RO=0A= devices/partitions. Of note though is that only reset and finish operations= have=0A= an effect on the zone data. Open and close have no effect at all on the zon= e=0A= data and only change the zone condition/state. But since they do change=0A= something on the drive, we can still consider them as "write" operations.= =0A= =0A= Best regards.=0A= =0A= -- =0A= Damien Le Moal=0A= Western Digital Research=0A=