All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Pankaj Raghav <p.raghav@samsung.com>
Cc: "Damien Le Moal" <damien.lemoal@opensource.wdc.com>,
	"Javier González" <javier.gonz@samsung.com>,
	"Keith Busch" <kbusch@kernel.org>,
	"Christoph Hellwig" <hch@lst.de>,
	"Sagi Grimberg" <sagi@grimberg.me>,
	"Johannes Thumshirn" <johannes.thumshirn@edc.com>,
	"Chaitanya Kulkarni" <chaitanya.kulkarni@wdc.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Adam Manzanares" <a.manzanares@samsung.com>,
	"kanchan Joshi" <joshi.k@samsung.com>,
	"Pankaj Raghav" <pankydev8@gmail.com>,
	"Kanchan Joshi" <joshiiitr@gmail.com>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: Fix zns drives without append support to export correct permissions
Date: Mon, 14 Mar 2022 09:44:49 +0100	[thread overview]
Message-ID: <20220314084449.GA5866@lst.de> (raw)
In-Reply-To: <6929490b-5a73-5dd3-d5a4-afe9d3c9b347@samsung.com>

On Mon, Mar 14, 2022 at 09:36:35AM +0100, Pankaj Raghav wrote:
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 51c08f206cbf..cde33f2a3a5a 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1855,8 +1855,7 @@ static void nvme_update_disk_info(struct gendisk
> *disk,
>  	blk_queue_max_write_zeroes_sectors(disk->queue,
>  					   ns->ctrl->max_zeroes_sectors);
> 
> -	set_disk_ro(disk, (id->nsattr & NVME_NS_ATTR_RO) ||
> -		test_bit(NVME_NS_FORCE_RO, &ns->flags));
> +	set_disk_ro(disk, (id->nsattr & NVME_NS_ATTR_RO));
>  }

This creates a race window during revalidation where the zone will be
set writable here only to be set read-only again a little later.


  reply	other threads:[~2022-03-14  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220311201638eucas1p18b9c5ecb3442b5a53bba233591d34db0@eucas1p1.samsung.com>
2022-03-11 20:16 ` [PATCH] nvme: Fix zns drives without append support to export correct permissions Pankaj Raghav
2022-03-11 20:49   ` Adam Manzanares
2022-03-12  8:14   ` Damien Le Moal
2022-03-14  8:36     ` Pankaj Raghav
2022-03-14  8:44       ` Christoph Hellwig [this message]
2022-03-14  9:21         ` Damien Le Moal
2022-03-14 10:19         ` Pankaj Raghav
2022-03-13 13:15   ` Sagi Grimberg
2022-03-14  6:21     ` Christoph Hellwig

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=20220314084449.GA5866@lst.de \
    --to=hch@lst.de \
    --cc=a.manzanares@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=javier.gonz@samsung.com \
    --cc=johannes.thumshirn@edc.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.