From: Coly Li <colyli@suse.de> To: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@kernel.dk>, Ilya Dryomov <idryomov@gmail.com>, Song Liu <song@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Stefan Haberland <sth@linux.ibm.com>, Jan Hoeppner <hoeppner@linux.ibm.com>, linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mtd@lists.infradead.org, linux-s390@vger.kernel.org, martin.petersen@oracle.com Subject: Re: [PATCH, RFC 11/10] block: propagate BLKROSET to all partitions Date: Sat, 7 Nov 2020 15:28:15 +0800 [thread overview] Message-ID: <a2add52e-715b-f82a-d6a0-b285f0f5acde@suse.de> (raw) In-Reply-To: <20201106140817.GA23557@lst.de> On 2020/11/6 22:08, Christoph Hellwig wrote: > > When setting the whole device read-only (or clearing the read-only > state), also update the policy for all partitions. The s390 dasd > driver has awlways been doing this and it makes a lot of sense. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Coly Li <colyli@suse.de> Thanks. Coly Li > --- > block/ioctl.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/block/ioctl.c b/block/ioctl.c > index 6b785181344fe1..22f394d118c302 100644 > --- a/block/ioctl.c > +++ b/block/ioctl.c > @@ -354,7 +354,10 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode, > if (ret) > return ret; > } > - bdev->bd_part->policy = n; > + if (bdev_is_partition(bdev)) > + bdev->bd_part->policy = n; > + else > + set_disk_ro(bdev->bd_disk, n); > return 0; > } > >
WARNING: multiple messages have this Message-ID (diff)
From: Coly Li <colyli@suse.de> To: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@kernel.dk>, linux-raid@vger.kernel.org, Jan Hoeppner <hoeppner@linux.ibm.com>, Vignesh Raghavendra <vigneshr@ti.com>, martin.petersen@oracle.com, linux-s390@vger.kernel.org, Richard Weinberger <richard@nod.at>, linux-block@vger.kernel.org, Song Liu <song@kernel.org>, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, Stefan Haberland <sth@linux.ibm.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org Subject: Re: [PATCH, RFC 11/10] block: propagate BLKROSET to all partitions Date: Sat, 7 Nov 2020 15:28:15 +0800 [thread overview] Message-ID: <a2add52e-715b-f82a-d6a0-b285f0f5acde@suse.de> (raw) In-Reply-To: <20201106140817.GA23557@lst.de> On 2020/11/6 22:08, Christoph Hellwig wrote: > > When setting the whole device read-only (or clearing the read-only > state), also update the policy for all partitions. The s390 dasd > driver has awlways been doing this and it makes a lot of sense. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Coly Li <colyli@suse.de> Thanks. Coly Li > --- > block/ioctl.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/block/ioctl.c b/block/ioctl.c > index 6b785181344fe1..22f394d118c302 100644 > --- a/block/ioctl.c > +++ b/block/ioctl.c > @@ -354,7 +354,10 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode, > if (ret) > return ret; > } > - bdev->bd_part->policy = n; > + if (bdev_is_partition(bdev)) > + bdev->bd_part->policy = n; > + else > + set_disk_ro(bdev->bd_disk, n); > return 0; > } > > ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-11-07 7:28 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-06 14:08 [PATCH, RFC 11/10] block: propagate BLKROSET to all partitions Christoph Hellwig 2020-11-06 14:08 ` Christoph Hellwig 2020-11-06 19:16 ` Stefan Haberland 2020-11-06 19:16 ` Stefan Haberland 2020-11-07 7:28 ` Coly Li [this message] 2020-11-07 7:28 ` Coly Li 2020-11-11 4:38 ` Martin K. Petersen 2020-11-11 4:38 ` Martin K. Petersen 2020-11-11 8:03 ` Christoph Hellwig 2020-11-11 8:03 ` Christoph Hellwig 2020-11-11 16:53 ` Martin K. Petersen 2020-11-11 16:53 ` Martin K. Petersen
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=a2add52e-715b-f82a-d6a0-b285f0f5acde@suse.de \ --to=colyli@suse.de \ --cc=axboe@kernel.dk \ --cc=ceph-devel@vger.kernel.org \ --cc=hch@lst.de \ --cc=hoeppner@linux.ibm.com \ --cc=idryomov@gmail.com \ --cc=linux-bcache@vger.kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=linux-raid@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --cc=miquel.raynal@bootlin.com \ --cc=richard@nod.at \ --cc=song@kernel.org \ --cc=sth@linux.ibm.com \ --cc=vigneshr@ti.com \ /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: linkBe 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.