Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp4013452ybd; Tue, 25 Jun 2019 12:26:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvtXTLP1OG0VJgZGnOKTTLwWgYS3HIU7F/CQ0EA8pWKnkCwvX9ZRHhLI0bGGYw6wt4Ai6/ X-Received: by 2002:a63:ec13:: with SMTP id j19mr20535235pgh.174.1561490797002; Tue, 25 Jun 2019 12:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561490796; cv=none; d=google.com; s=arc-20160816; b=nMwZYadOO5czzcdr0rueYmA3qsTBb1hVL0/b5J71B+JCQsk7SqKIhTQsiwQdeLUiTG sLuFR1WRX377lKe7VUKMpNwkq0VSclsLsb5tAiZw5PPSV7I9roo4f8R/boTxg5zHzUYI /P6w35P6Mt5S8uZg8j5OOfQXwihoCFqaYON0z8OYL5UDya0FS4dT2TR5S4X08/lbMRlf F3GvF3bbWb0n8+5A8bDrP/7BefRkovHoNysSeY79LjqWxIK37V7S5UFxVMknI/sQeATa WXZOUhvB7A7M9Tr+mDBxElvd8pQrEnsbJO9FZLbTsvbgn1lFI8Y+RzB6rG5HdOPsTzDq Tv7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=kR0WUI8Wb/oooTRRXaBppmKY4itrnwNoAnfaDYxWCXg=; b=FcT8kCLXjufbFNJ26FxsVWqEvjSOBHH/PnCS95q7/MIdP7Q+Zw2MJD5gPWb1YDWVNe +44n8G2rhXZJ39993+kuHDtyR7bfC4ECqmoV6Or5iWANO1S2CYO/plMu5U3A8MfvrqL0 D/NHSqTe0MvAE2y4eqkuzbdysKncuSUNd4aDUR76+9EZkhAKh51PSoyJRg2w4PBlkhG5 we1+wH2srcADAWMBaute3y5PqYkWYwtSJ87qZa7aR+otOnmfXNGQvX/xnKTeaWQDQLQb QMmulDiwOcs6t4vzkybUPGlRLl/Xzdrp0IOiY4e+Cc/8IT4+K+39y7VyofMcAyLit4rn kNXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b="Ef0Cu/RE"; 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 u21si13768424pgm.431.2019.06.25.12.26.21; Tue, 25 Jun 2019 12:26:36 -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=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b="Ef0Cu/RE"; 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 S1729065AbfFYQam (ORCPT + 99 others); Tue, 25 Jun 2019 12:30:42 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:42358 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728529AbfFYQal (ORCPT ); Tue, 25 Jun 2019 12:30:41 -0400 Received: by mail-ed1-f67.google.com with SMTP id z25so27994697edq.9 for ; Tue, 25 Jun 2019 09:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=kR0WUI8Wb/oooTRRXaBppmKY4itrnwNoAnfaDYxWCXg=; b=Ef0Cu/REsmQg6MhTc0LYNFTuhGc/eYuhkoJy1MGD6n5TmP+cKrBx8wz8DHzN4qWA/w vZojz0AdcMfxpwZJ7hgKiQr/hzQhMIThIwtXks+4SynHn8cJdogvib5h19034NVKrMAI NjWd6xGzFc6MXM3hEvtByGou96H6k5pVi1RhgmUhXkvtUZTn8bireeiH0H5rmKaFfm32 I/VKCt/kPCSqGu1d2+flXrxMsqpEUghbeMhl4KnWUHVtkf6ud8zMVi9wgsEEysTlyCjC jFfLAlDGpF7w1EyEsVC3njvZ7t9cUm8tcMvbOeiJOsDj8kUUmzeT+QI4FDBlt4BZ3PQZ 8iuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=kR0WUI8Wb/oooTRRXaBppmKY4itrnwNoAnfaDYxWCXg=; b=MYj/HokH4B0NUlxta5wOIbNaBJAdxkmvSi4+X+oioWEbIxa+3Uisk6O369SJIZN5sm YJ4sn5qWZlal116UiQalhrTrI2hEMd7TeRIIxgpQ6e+FEcINYVZaNVnzL8gXhvakCO3d Ho8ipJyJSNIMKY1bbPrhnzIUtLkGrunP1antICObEXNL0eDnP9Js4RIB9GXAYEMphk4p ZXdFiNGvjZfnApYlADJ4qjiWVJTVDKEqg+LuZUEVm0FkU90/Iw/h5++UerPdCOf32oBO eI3mOkJJxgL+Q3cYguizdTHeXb5cE0plH92wGFjWfnrvuvJvEz4mpzNlwx6pDBUItyL/ g9PA== X-Gm-Message-State: APjAAAVpMNMNTwb3inXfUUNn1B2Zc29/Pmu+iHGxTGEAmW61WxcrD4QZ WjueKwuE21kE/TAt6wXu0m/JdA== X-Received: by 2002:a17:906:487:: with SMTP id f7mr15597256eja.236.1561480239429; Tue, 25 Jun 2019 09:30:39 -0700 (PDT) Received: from [192.168.1.119] (ip-5-186-122-168.cgn.fibianet.dk. [5.186.122.168]) by smtp.gmail.com with ESMTPSA id f3sm2477238ejo.90.2019.06.25.09.30.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 09:30:38 -0700 (PDT) From: =?utf-8?Q?Javier_Gonz=C3=A1lez?= Message-Id: <798FDD1F-415C-43CD-AC8E-3BEB08FD3AE4@javigon.com> Content-Type: multipart/signed; boundary="Apple-Mail=_05ED6925-114F-4BB9-8D0F-85B181FB037A"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH 1/4] block: add zone open, close and finish support Date: Tue, 25 Jun 2019 18:30:37 +0200 In-Reply-To: <79ca395d-8019-9ec8-0c0b-194ca6d9eda0@acm.org> Cc: =?utf-8?Q?Matias_Bj=C3=B8rling?= , Chaitanya Kulkarni , Jens Axboe , Christoph Hellwig , Damien Le Moal , Dmitry Fomichev , Ajay Joshi , Aravind Ramesh , "martin.petersen@oracle.com" , "James.Bottomley@HansenPartnership.com" , "agk@redhat.com" , "snitzer@redhat.com" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "dm-devel@redhat.com" , Matias Bjorling To: Bart Van Assche References: <20190621130711.21986-1-mb@lightnvm.io> <20190621130711.21986-2-mb@lightnvm.io> <79ca395d-8019-9ec8-0c0b-194ca6d9eda0@acm.org> X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_05ED6925-114F-4BB9-8D0F-85B181FB037A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 25 Jun 2019, at 17.55, Bart Van Assche wrote: >=20 > On 6/25/19 3:35 AM, Matias Bj=C3=B8rling wrote: >> On 6/25/19 12:27 AM, Chaitanya Kulkarni wrote: >>> On 6/24/19 12:43 PM, Bart Van Assche wrote: >>>> static inline bool op_is_write(unsigned int op) >>>> { >>>> return (op & 1); >>>> } >> The zone mgmt commands are neither write nor reads commands. I guess, = one could characterize them as write commands, but they don't write any = data, they update a state of a zone on a drive. One should keep it as = is? and make sure the zone mgmt commands don't get categorized as either = read/write. >=20 > Since the open, close and finish operations support modifying zone = data I propose to characterize these as write commands. How about the = following additional changes: > - Make bio_check_ro() refuse open/close/flush/reset zone operations = for read-only partitions (see also commit a32e236eb93e ("Partially = revert "block: fail op_is_write() requests to read-only partitions"") # = v4.18). > - In submit_bio(), change op_is_write(bio_op(bio)) ? "WRITE" : "READ" = into something that uses blk_op_str(). > - Add open/close/flush zone support be added in blk_partition_remap(). >=20 > Thanks, >=20 > Bart. Agreed. This is also what we do with REQ_OP_DISCARD and it makes things easier in the driver. Apart from the return comment from Damien and Minwoo, the patch looks = good to me. Reviewed-by: Javier Gonz=C3=A1lez --Apple-Mail=_05ED6925-114F-4BB9-8D0F-85B181FB037A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEU1dMZpvMIkj0jATvPEYBfS0leOAFAl0STC0ACgkQPEYBfS0l eODeeg/8CeCql8ROfdygJuY5YBknnNtJ3MBG0pVnbVyzvejjnzJUDMmAPd6dkXe+ CqFiJ2qBtgcqQawrGwUpwG+Z3a2lq0ts9KjDEh3XWDbERplM1i9kq89xAO8E8pLU J0zyzYyLMzp3v2Ht+UKhH37Ml2CcfUX5+fpwcF7GhNiVi03Z+g/MhA7uyZ3p52lC 9tFNmpPGHP818kqFZIZu+TrfCDQFeiUu6F+ve8X3BowxS9dzwbiTYteBKny1cBZ5 1whAbzLbStIbcKZs7An6/DCDebppZkC7HAf7ZJw4yobWOqUF2sTO3+UouYpuHNob WPpX1+bh84AyLGVp04c2G6iNBEYfDQMRovCJ8BMOTebmRuDk7OQmldNMbGDgLhGd ap/hGkASIUe43bFY1kVeVwAKIms8zUMBAJxHuhhQ1DErRLBEHBVtYTqQlHhX3b/L Z3Tcldt3h+tMBjiDSh1yZ6ZREIJ0aWU6V4uTFSZjpxD7p2NA8p/2zmS3tNjAiZZ4 Ng0ENcfOPtmunqXKw1sUk7Zc5LWD8ybX3EKfU2iLfN/+N2DFl+q5w5WhKQOmBscb DdWJglfESr6FnesiiuR3a2fhm24LlhEmNmAcE9cu6UHFcWsoIef18q+1OOdQZp5h UGgljTYKj1Esl9iHL6/F/MPFIcpKbyFexxhY8EFlXfUO3/Amgrg= =xyg2 -----END PGP SIGNATURE----- --Apple-Mail=_05ED6925-114F-4BB9-8D0F-85B181FB037A--