All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@wdc.com>
To: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: [PATCH v3 05/11] dm: cleanup device_area_is_invalid()
Date: Fri, 21 May 2021 12:01:13 +0900	[thread overview]
Message-ID: <20210521030119.1209035-6-damien.lemoal@wdc.com> (raw)
In-Reply-To: <20210521030119.1209035-1-damien.lemoal@wdc.com>

In device_area_is_invalid(), use bdev_is_zoned() instead of open
coding the test on the zoned model returned by bdev_zoned_model().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index ee47a332b462..21fd9cd4da32 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -249,7 +249,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
 	 * If the target is mapped to zoned block device(s), check
 	 * that the zones are not partially mapped.
 	 */
-	if (bdev_zoned_model(bdev) != BLK_ZONED_NONE) {
+	if (bdev_is_zoned(bdev)) {
 		unsigned int zone_sectors = bdev_zone_sectors(bdev);
 
 		if (start & (zone_sectors - 1)) {
-- 
2.31.1


WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <damien.lemoal@wdc.com>
To: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: [dm-devel] [PATCH v3 05/11] dm: cleanup device_area_is_invalid()
Date: Fri, 21 May 2021 12:01:13 +0900	[thread overview]
Message-ID: <20210521030119.1209035-6-damien.lemoal@wdc.com> (raw)
In-Reply-To: <20210521030119.1209035-1-damien.lemoal@wdc.com>

In device_area_is_invalid(), use bdev_is_zoned() instead of open
coding the test on the zoned model returned by bdev_zoned_model().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index ee47a332b462..21fd9cd4da32 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -249,7 +249,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
 	 * If the target is mapped to zoned block device(s), check
 	 * that the zones are not partially mapped.
 	 */
-	if (bdev_zoned_model(bdev) != BLK_ZONED_NONE) {
+	if (bdev_is_zoned(bdev)) {
 		unsigned int zone_sectors = bdev_zone_sectors(bdev);
 
 		if (start & (zone_sectors - 1)) {
-- 
2.31.1

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  parent reply	other threads:[~2021-05-21  3:01 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  3:01 [PATCH v3 00/11] dm: Improve zoned block device support Damien Le Moal
2021-05-21  3:01 ` [dm-devel] " Damien Le Moal
2021-05-21  3:01 ` [PATCH v3 01/11] block: improve handling of all zones reset operation Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  5:13   ` Johannes Thumshirn
2021-05-21  5:13     ` [dm-devel] " Johannes Thumshirn
2021-05-24  0:30   ` Chaitanya Kulkarni
2021-05-24  0:30     ` [dm-devel] " Chaitanya Kulkarni
2021-05-21  3:01 ` [PATCH v3 02/11] block: introduce bio zone helpers Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  5:06   ` Johannes Thumshirn
2021-05-21  5:06     ` [dm-devel] " Johannes Thumshirn
2021-05-24  2:24   ` Chaitanya Kulkarni
2021-05-24  2:24     ` [dm-devel] " Chaitanya Kulkarni
2021-05-21  3:01 ` [PATCH v3 03/11] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-24  2:24   ` Chaitanya Kulkarni
2021-05-24  2:24     ` [dm-devel] " Chaitanya Kulkarni
2021-05-21  3:01 ` [PATCH v3 04/11] dm: Fix dm_accept_partial_bio() Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  3:01 ` Damien Le Moal [this message]
2021-05-21  3:01   ` [dm-devel] [PATCH v3 05/11] dm: cleanup device_area_is_invalid() Damien Le Moal
2021-05-21  3:01 ` [PATCH v3 06/11] dm: move zone related code to dm-zone.c Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  3:01 ` [PATCH v3 07/11] dm: Introduce dm_report_zones() Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  3:01 ` [PATCH v3 08/11] dm: Forbid requeue of writes to zones Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  5:10   ` Johannes Thumshirn
2021-05-21  5:10     ` [dm-devel] " Johannes Thumshirn
2021-05-21  3:01 ` [PATCH v3 09/11] dm: rearrange core declarations Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  5:09   ` Johannes Thumshirn
2021-05-21  5:09     ` [dm-devel] " Johannes Thumshirn
2021-05-21  3:01 ` [PATCH v3 10/11] dm: introduce zone append emulation Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  3:01 ` [PATCH v3 11/11] dm crypt: Fix zoned block device support Damien Le Moal
2021-05-21  3:01   ` [dm-devel] " Damien Le Moal
2021-05-21  5:07   ` Johannes Thumshirn
2021-05-21  5:07     ` [dm-devel] " Johannes Thumshirn

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=20210521030119.1209035-6-damien.lemoal@wdc.com \
    --to=damien.lemoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --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.