Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp4024328ybd; Tue, 25 Jun 2019 12:38:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNpdMBbTMxiuZGlAJEPEE5e/6inwMk9HtMvIVZFL6XfxVnwDdrI+zPXk8biwBhi/FMkYQ1 X-Received: by 2002:a63:e250:: with SMTP id y16mr39392138pgj.392.1561491539693; Tue, 25 Jun 2019 12:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561491539; cv=none; d=google.com; s=arc-20160816; b=pYmViD3sH++KVWQz4JefpWBwUOO7ogr32ZuKFbYm87LFsnXgPafSZCPXsroGjVFWle GPa+xgIKq3NRQuusciLaLmokIzixK0BWx3H5ht8hrUISTcOZ00RrjvyHS9TgQqQyBNPg 6JYIhrszP8O/BUMWybiJ/jnj86jA+QYI9sCtWgw8CEqYntv/hQ48ss/rcjraGFNkIlRr TbOLDuPxDrHZ6CG4Pf4ENCPm7yrJ+DCl7Os2/lpZ+1zBg/vITrq1z3HAQIyGF8gWgwQ4 Vmon7Q94wKdNWf2nZfmtbjHdO0q/ZdmhOI/gltc0xd6SW2y+GXo4wf0QVWCEJUhDepXa /TEQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vHHgb54Q0BfAs8YIgZACGl/29xaSx7l4ApCtXBFbfN4=; b=Svbih3ix+Hg4fQ3/4espPViFnI4YkuSqShFQsJ4XLe86oiD33Npsbo6XtfPFL9zjec fCwFyXKXmXjsGLHihBKj8kz2VS5eU8A0Ud3XTbAvACFVHxxRTkVm7YvdBbbAs0pDs3rs 4CRUuodynpJdAY4jDflZykgdXgE9behSBWeuMSQSRuWTfH38WpVNQVxfxBdI6uonK3r0 NRoA9NwuLU3I3fuJapLl4yPAtaPa0btM2UUywVOssMQDRremmFo1x2NSxUAkIiNj5XKX 6s+9OSPR6Y+Ur7Rm58/SUBpAnpYQ40IUkc88l6jj2GKCVdwP6DFlwmofq6vs441RRNYN nB2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=OwjJ6MI5; 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 j17si14435264pfr.13.2019.06.25.12.38.44; Tue, 25 Jun 2019 12:38:59 -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=OwjJ6MI5; 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 S1727016AbfFYQxr (ORCPT + 99 others); Tue, 25 Jun 2019 12:53:47 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38373 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728247AbfFYQxr (ORCPT ); Tue, 25 Jun 2019 12:53:47 -0400 Received: by mail-lf1-f66.google.com with SMTP id b11so13177191lfa.5 for ; Tue, 25 Jun 2019 09:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vHHgb54Q0BfAs8YIgZACGl/29xaSx7l4ApCtXBFbfN4=; b=OwjJ6MI5fFr6MREqqCFmqZIKon79e5NOLq/VxpW1LVnpQzj0dwCFqePPRTogYiBhby r32JOo+dOfsXvukpJTWY1IPSf31g8UoBj0ehc1OXlIgvPaVQdtmbCgqXqxJXGdfJuXai NEuh0A+ak/VC3phXrNBXTREO9w1J2GqhC5JV+wiQN07JDZufLRNe3QRfjXWWLgRewhH7 wZQ5z0MVX0KejwbCkHRHUSEY8buIxdhhLa7A6gJEmRadxcoUvwpnIEkRvVvFjbFjAqwa TvSMAH4KS+K5mx5D/BITgHTL0G5zurhcROtdK7aR2X8CGaMYQR+wxSlzfC6RBou1+R/k b0sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vHHgb54Q0BfAs8YIgZACGl/29xaSx7l4ApCtXBFbfN4=; b=DvGNbeGWYnT0V4s7jql7X+bLT82l0P8zCshNjc9FrsbHI6qAWI/m2I3iQbxD0+53ko eihICvzUoSsFIlbLt11ikKNFCh8D/W28o0fV7X27QyaJDxDSTSagvCyv41XkA7S45W+R 33tP0s74mNFK/yu4kvZ6s2fLutXc6ZDL+vx0+/JSlEKk/+1cHmPPiKP2NoAFs9ynCClL I2tzO+a2m8gpij8T+T2Kwd6x82v9pPEI734r6vC6X3lbmjGqH+nfAHyqrEMNTbNeFHHJ l4CwjhzMtaEZHY2l738v79YG/JdpX2fB39o2mwgoY1aYUvD6meoLiuD1wYAQPEIRfEM8 JdVQ== X-Gm-Message-State: APjAAAVj7gCCCL8vZ26ozHId5OKl3nJus+lCn/u/qkZSTnFi+Ecx3xo2 kbx8zfHUNZmHBZVzMU6qyBJWYt9lycxYbgRxPL9W9A== X-Received: by 2002:a19:22d8:: with SMTP id i207mr24053341lfi.97.1561481624939; Tue, 25 Jun 2019 09:53:44 -0700 (PDT) MIME-Version: 1.0 References: <20190621130711.21986-1-mb@lightnvm.io> <20190621130711.21986-2-mb@lightnvm.io> <79ca395d-8019-9ec8-0c0b-194ca6d9eda0@acm.org> In-Reply-To: From: =?UTF-8?Q?Matias_Bj=C3=B8rling?= Date: Tue, 25 Jun 2019 18:53:34 +0200 Message-ID: Subject: Re: [PATCH 1/4] block: add zone open, close and finish support To: Chaitanya Kulkarni Cc: Bart Van Assche , "axboe@fb.com" , "hch@lst.de" , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 6:51 PM Chaitanya Kulkarni wrote: > > On 06/25/2019 08:56 AM, Bart Van Assche wrote: > > 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 an= y > >> 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 eith= er > >> read/write. > > > > 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 > ^ > Since finish also listed above which supports modifying data do we need > to add finish here with flush in above line ? > > > 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(). > Good idea, I've a patch for blk_op_str() and debugfs just waiting for > this to merge. Does it make sense to add that patch in this series ? Ship it off separately. Your patches can go in first. > > - Add open/close/flush zone support be added in blk_partition_remap(). > same here for finish ? > > > > Thanks, > > > > Bart. > > >