From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Oleksii Kurochko <olkuroch@cisco.com>,
Sagi Grimberg <sagi@grimberg.me>,
Mike Snitzer <snitzer@redhat.com>,
Ilya Dryomov <idryomov@gmail.com>,
Dongsheng Yang <dongsheng.yang@easystack.cn>,
ceph-devel@vger.kernel.org, dm-devel@redhat.com,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 3/6] block: add a hard-readonly flag to struct gendisk
Date: Tue, 8 Dec 2020 11:57:47 +0100 [thread overview]
Message-ID: <20201208105747.GA21762@lst.de> (raw)
In-Reply-To: <20201208102211.GC1202995@T590>
On Tue, Dec 08, 2020 at 06:22:11PM +0800, Ming Lei wrote:
> > int bdev_read_only(struct block_device *bdev)
> > {
> > - return bdev->bd_read_only;
> > + return bdev->bd_read_only ||
> > + test_bit(GD_READ_ONLY, &bdev->bd_disk->state);
> > }
> > EXPORT_SYMBOL(bdev_read_only);
>
> Maybe one inline version can be added for fast path(bio_check_ro()), and the approach
> is good:
I thought of that, but our header mess means it would have to be a macro.
I have a plan to reorganize the headers in the not too far future, at which
point this should become an inline.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
Mike Snitzer <snitzer@redhat.com>,
Oleksii Kurochko <olkuroch@cisco.com>,
ceph-devel@vger.kernel.org,
Dongsheng Yang <dongsheng.yang@easystack.cn>,
linux-block@vger.kernel.org, dm-devel@redhat.com,
linux-nvme@lists.infradead.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Ilya Dryomov <idryomov@gmail.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [dm-devel] [PATCH 3/6] block: add a hard-readonly flag to struct gendisk
Date: Tue, 8 Dec 2020 11:57:47 +0100 [thread overview]
Message-ID: <20201208105747.GA21762@lst.de> (raw)
In-Reply-To: <20201208102211.GC1202995@T590>
On Tue, Dec 08, 2020 at 06:22:11PM +0800, Ming Lei wrote:
> > int bdev_read_only(struct block_device *bdev)
> > {
> > - return bdev->bd_read_only;
> > + return bdev->bd_read_only ||
> > + test_bit(GD_READ_ONLY, &bdev->bd_disk->state);
> > }
> > EXPORT_SYMBOL(bdev_read_only);
>
> Maybe one inline version can be added for fast path(bio_check_ro()), and the approach
> is good:
I thought of that, but our header mess means it would have to be a macro.
I have a plan to reorganize the headers in the not too far future, at which
point this should become an inline.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
Mike Snitzer <snitzer@redhat.com>,
Oleksii Kurochko <olkuroch@cisco.com>,
ceph-devel@vger.kernel.org,
Dongsheng Yang <dongsheng.yang@easystack.cn>,
linux-block@vger.kernel.org, dm-devel@redhat.com,
linux-nvme@lists.infradead.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Ilya Dryomov <idryomov@gmail.com>, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 3/6] block: add a hard-readonly flag to struct gendisk
Date: Tue, 8 Dec 2020 11:57:47 +0100 [thread overview]
Message-ID: <20201208105747.GA21762@lst.de> (raw)
In-Reply-To: <20201208102211.GC1202995@T590>
On Tue, Dec 08, 2020 at 06:22:11PM +0800, Ming Lei wrote:
> > int bdev_read_only(struct block_device *bdev)
> > {
> > - return bdev->bd_read_only;
> > + return bdev->bd_read_only ||
> > + test_bit(GD_READ_ONLY, &bdev->bd_disk->state);
> > }
> > EXPORT_SYMBOL(bdev_read_only);
>
> Maybe one inline version can be added for fast path(bio_check_ro()), and the approach
> is good:
I thought of that, but our header mess means it would have to be a macro.
I have a plan to reorganize the headers in the not too far future, at which
point this should become an inline.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-12-08 10:58 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 13:19 split hard read-only vs read-only policy v2 Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-07 13:19 ` [PATCH 1/6] dm: use bdev_read_only to check if a device is read-only Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-08 5:23 ` Martin K. Petersen
2020-12-08 5:23 ` Martin K. Petersen
2020-12-08 5:23 ` [dm-devel] " Martin K. Petersen
2020-12-08 9:59 ` Ming Lei
2020-12-08 9:59 ` Ming Lei
2020-12-08 9:59 ` [dm-devel] " Ming Lei
2020-12-07 13:19 ` [PATCH 2/6] block: remove the NULL bdev check in bdev_read_only Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-08 5:23 ` Martin K. Petersen
2020-12-08 5:23 ` Martin K. Petersen
2020-12-08 5:23 ` [dm-devel] " Martin K. Petersen
2020-12-08 10:06 ` Ming Lei
2020-12-08 10:06 ` Ming Lei
2020-12-08 10:06 ` [dm-devel] " Ming Lei
2020-12-07 13:19 ` [PATCH 3/6] block: add a hard-readonly flag to struct gendisk Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-08 5:24 ` Martin K. Petersen
2020-12-08 5:24 ` Martin K. Petersen
2020-12-08 5:24 ` [dm-devel] " Martin K. Petersen
2020-12-08 5:28 ` Martin K. Petersen
2020-12-08 5:28 ` Martin K. Petersen
2020-12-08 5:28 ` [dm-devel] " Martin K. Petersen
2020-12-08 10:22 ` Ming Lei
2020-12-08 10:22 ` Ming Lei
2020-12-08 10:22 ` [dm-devel] " Ming Lei
2020-12-08 10:57 ` Christoph Hellwig [this message]
2020-12-08 10:57 ` Christoph Hellwig
2020-12-08 10:57 ` [dm-devel] " Christoph Hellwig
2020-12-07 13:19 ` [PATCH 4/6] block: propagate BLKROSET on the whole device to all partitions Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-08 5:27 ` Martin K. Petersen
2020-12-08 5:27 ` Martin K. Petersen
2020-12-08 5:27 ` [dm-devel] " Martin K. Petersen
2020-12-08 9:25 ` Christoph Hellwig
2020-12-08 9:25 ` Christoph Hellwig
2020-12-08 9:25 ` [dm-devel] " Christoph Hellwig
2020-12-08 12:41 ` Johannes Thumshirn
2020-12-08 12:41 ` Johannes Thumshirn
2020-12-08 12:41 ` [dm-devel] " Johannes Thumshirn
2020-12-08 10:29 ` Ming Lei
2020-12-08 10:29 ` Ming Lei
2020-12-08 10:29 ` [dm-devel] " Ming Lei
2020-12-08 10:59 ` Christoph Hellwig
2020-12-08 10:59 ` Christoph Hellwig
2020-12-08 10:59 ` [dm-devel] " Christoph Hellwig
2020-12-09 1:23 ` Ming Lei
2020-12-09 1:23 ` Ming Lei
2020-12-09 1:23 ` [dm-devel] " Ming Lei
2020-12-07 13:19 ` [PATCH 5/6] rbd: remove the ->set_read_only method Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-07 14:57 ` Ilya Dryomov
2020-12-07 14:57 ` Ilya Dryomov
2020-12-07 14:57 ` [dm-devel] " Ilya Dryomov
2020-12-08 5:30 ` Martin K. Petersen
2020-12-08 5:30 ` Martin K. Petersen
2020-12-08 5:30 ` [dm-devel] " Martin K. Petersen
2020-12-07 13:19 ` [PATCH 6/6] nvme: allow revalidate to set a namespace read-only Christoph Hellwig
2020-12-07 13:19 ` Christoph Hellwig
2020-12-07 13:19 ` [dm-devel] " Christoph Hellwig
2020-12-07 18:13 ` Keith Busch
2020-12-07 18:13 ` Keith Busch
2020-12-07 18:13 ` [dm-devel] " Keith Busch
2020-12-08 5:29 ` Martin K. Petersen
2020-12-08 5:29 ` Martin K. Petersen
2020-12-08 5:29 ` [dm-devel] " Martin K. Petersen
2020-12-10 7:50 ` split hard read-only vs read-only policy v2 Christoph Hellwig
2020-12-10 7:50 ` Christoph Hellwig
2020-12-10 7:50 ` [dm-devel] " Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2020-12-08 16:28 split hard read-only vs read-only policy v3 Christoph Hellwig
2020-12-08 16:28 ` [PATCH 3/6] block: add a hard-readonly flag to struct gendisk Christoph Hellwig
2020-12-08 16:28 ` Christoph Hellwig
2021-01-09 10:42 split hard read-only vs read-only policy v3 (resend) Christoph Hellwig
2021-01-09 10:42 ` [PATCH 3/6] block: add a hard-readonly flag to struct gendisk Christoph Hellwig
2021-01-09 10:42 ` 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=20201208105747.GA21762@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=dm-devel@redhat.com \
--cc=dongsheng.yang@easystack.cn \
--cc=hare@suse.de \
--cc=idryomov@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=olkuroch@cisco.com \
--cc=sagi@grimberg.me \
--cc=snitzer@redhat.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: 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.