All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Pankaj Raghav <p.raghav@samsung.com>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Javier González" <javier.gonz@samsung.com>,
	"Keith Busch" <kbusch@kernel.org>,
	"Sagi Grimberg" <sagi@grimberg.me>,
	"Damien Le Moal" <damien.lemoal@opensource.wdc.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Adam Manzanares" <a.manzanares@samsung.com>,
	"kanchan Joshi" <joshi.k@samsung.com>,
	"Johannes Thumshirn" <johannes.thumshirn@wdc.com>,
	"Pankaj Raghav" <pankydev8@gmail.com>,
	"Kanchan Joshi" <joshiiitr@gmail.com>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2] nvme: Fix zns drives without append support to export correct permissions
Date: Tue, 22 Mar 2022 09:39:14 +0100	[thread overview]
Message-ID: <20220322083914.GA26494@lst.de> (raw)
In-Reply-To: <72344561-a6fd-bb61-bed1-3aa12bd8cc02@samsung.com>

On Wed, Mar 16, 2022 at 03:28:30PM +0100, Pankaj Raghav wrote:
> Hi Christoph,
> 
> On 2022-03-16 11:50, Christoph Hellwig wrote:
> > On Wed, Mar 16, 2022 at 10:34:23AM +0100, Pankaj Raghav wrote:
> 
> >> -		test_bit(NVME_NS_FORCE_RO, &ns->flags));
> >> +	set_disk_ro(disk, (id->nsattr & NVME_NS_ATTR_RO));
> > 
> > This will now set a namespace that was read-only due to unsupported ZNS
> > features writable during revalidation.
> 
> >>  	blk_queue_max_active_zones(q, le32_to_cpu(id->mar) + 1);
> >> +	nvme_set_disk_mode_ro(ns);
> 
> > And this will set a disk that is read-only due to NVME_NS_ATTR_RO
> > writable if the controller supports all essential ZNS features.
> You are right, this is not the right way to fix it.
> 
> What do you think about setting the disk permission after the disk info?
> That won't introduce any race and also makes sure all parameters are
> correctly set:

I don't think we really need the nvme_set_disk_mode helper,  but we
also need this call for the multipath disk.

Otherwise the approach looks good to me.


  reply	other threads:[~2022-03-22  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220316093439eucas1p27c2a31849e9dec6c6bc217c5f1b26180@eucas1p2.samsung.com>
2022-03-16  9:34 ` [PATCH v2] nvme: Fix zns drives without append support to export correct permissions Pankaj Raghav
2022-03-16  9:54   ` Chaitanya Kulkarni
2022-03-16  9:56     ` Chaitanya Kulkarni
2022-03-16 10:21       ` Pankaj Raghav
2022-03-16 16:50         ` Chaitanya Kulkarni
2022-03-16 18:03           ` Pankaj Raghav
2022-03-16 10:50   ` Christoph Hellwig
2022-03-16 14:28     ` Pankaj Raghav
2022-03-22  8:39       ` Christoph Hellwig [this message]
2022-03-16 16:52   ` Chaitanya Kulkarni
2022-03-16 18:00     ` Pankaj Raghav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220322083914.GA26494@lst.de \
    --to=hch@lst.de \
    --cc=a.manzanares@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=javier.gonz@samsung.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=joshi.k@samsung.com \
    --cc=joshiiitr@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mcgrof@kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=pankydev8@gmail.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.