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 v4 00/11] dm: Improve zoned block device support Date: Tue, 25 May 2021 11:25:28 +0900 [thread overview] Message-ID: <20210525022539.119661-1-damien.lemoal@wdc.com> (raw) This series improve device mapper support for zoned block devices and of targets exposing a zoned device. The first patch improve support for user requests to reset all zones of the target device. With the fix, such operation behave similarly to physical block devices implementation based on the single zone reset command with the ALL bit set. The following 2 patches are preparatory block layer patches. Patch 4 and 5 are 2 small fixes to DM core zoned block device support. Patch 6 reorganizes DM core code, moving conditionally defined zoned block device code into the new dm-zone.c file. This avoids sprinkly DM with zone related code defined under an #ifdef CONFIG_BLK_DEV_ZONED. Patch 7 improves DM zone report helper functions for target drivers. Patch 8 fixes a potential problem with BIO requeue on zoned target. Finally, patch 9 to 11 implement zone append emulation using regular writes for target drivers that cannot natively support this BIO type. The only target currently needing this emulation is dm-crypt. With this change, a zoned dm-crypt device behaves exactly like a regular zoned block device, correctly executing user zone append BIOs. This series passes the following tests: 1) zonefs tests on top of dm-crypt with a zoned nullblk device 2) zonefs tests on top of dm-crypt+dm-linear with an SMR HDD 3) btrfs fstests on top of dm-crypt with zoned nullblk devices. Comments are as always welcome. Changes from v3: * Fixed missing variable initialization in blkdev_zone_reset_all_emulated() in patch 1. * Rebased on rc3 * Added reviewed-by tags Changes from v2: * Replace use of spinlock to protect the zone write pointer offset array in patch 11 with READ_ONCE/WRITE_ONCE as suggested by Hannes. * Added reviewed-by tags Changes from v1: * Use Christoph proposed approach for patch 1 (split reset all processing into different functions) * Changed helpers introduced in patch 2 to remove the request_queue argument * Improve patch 3 commit message as suggested by Christoph (explaining that the flag is a special case that cannot use a REQ_XXX flag) * Changed DMWARN() into DMDEBUG in patch 11 as suggested by Milan * Added reviewed-by tags Damien Le Moal (11): block: improve handling of all zones reset operation block: introduce bio zone helpers block: introduce BIO_ZONE_WRITE_LOCKED bio flag dm: Fix dm_accept_partial_bio() dm: cleanup device_area_is_invalid() dm: move zone related code to dm-zone.c dm: Introduce dm_report_zones() dm: Forbid requeue of writes to zones dm: rearrange core declarations dm: introduce zone append emulation dm crypt: Fix zoned block device support block/blk-zoned.c | 119 +++++-- drivers/md/Makefile | 4 + drivers/md/dm-core.h | 65 ++++ drivers/md/dm-crypt.c | 31 +- drivers/md/dm-flakey.c | 7 +- drivers/md/dm-linear.c | 7 +- drivers/md/dm-table.c | 21 +- drivers/md/dm-zone.c | 654 ++++++++++++++++++++++++++++++++++ drivers/md/dm.c | 202 +++-------- drivers/md/dm.h | 30 +- include/linux/blk_types.h | 1 + include/linux/blkdev.h | 12 + include/linux/device-mapper.h | 9 +- 13 files changed, 955 insertions(+), 207 deletions(-) create mode 100644 drivers/md/dm-zone.c -- 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 v4 00/11] dm: Improve zoned block device support Date: Tue, 25 May 2021 11:25:28 +0900 [thread overview] Message-ID: <20210525022539.119661-1-damien.lemoal@wdc.com> (raw) This series improve device mapper support for zoned block devices and of targets exposing a zoned device. The first patch improve support for user requests to reset all zones of the target device. With the fix, such operation behave similarly to physical block devices implementation based on the single zone reset command with the ALL bit set. The following 2 patches are preparatory block layer patches. Patch 4 and 5 are 2 small fixes to DM core zoned block device support. Patch 6 reorganizes DM core code, moving conditionally defined zoned block device code into the new dm-zone.c file. This avoids sprinkly DM with zone related code defined under an #ifdef CONFIG_BLK_DEV_ZONED. Patch 7 improves DM zone report helper functions for target drivers. Patch 8 fixes a potential problem with BIO requeue on zoned target. Finally, patch 9 to 11 implement zone append emulation using regular writes for target drivers that cannot natively support this BIO type. The only target currently needing this emulation is dm-crypt. With this change, a zoned dm-crypt device behaves exactly like a regular zoned block device, correctly executing user zone append BIOs. This series passes the following tests: 1) zonefs tests on top of dm-crypt with a zoned nullblk device 2) zonefs tests on top of dm-crypt+dm-linear with an SMR HDD 3) btrfs fstests on top of dm-crypt with zoned nullblk devices. Comments are as always welcome. Changes from v3: * Fixed missing variable initialization in blkdev_zone_reset_all_emulated() in patch 1. * Rebased on rc3 * Added reviewed-by tags Changes from v2: * Replace use of spinlock to protect the zone write pointer offset array in patch 11 with READ_ONCE/WRITE_ONCE as suggested by Hannes. * Added reviewed-by tags Changes from v1: * Use Christoph proposed approach for patch 1 (split reset all processing into different functions) * Changed helpers introduced in patch 2 to remove the request_queue argument * Improve patch 3 commit message as suggested by Christoph (explaining that the flag is a special case that cannot use a REQ_XXX flag) * Changed DMWARN() into DMDEBUG in patch 11 as suggested by Milan * Added reviewed-by tags Damien Le Moal (11): block: improve handling of all zones reset operation block: introduce bio zone helpers block: introduce BIO_ZONE_WRITE_LOCKED bio flag dm: Fix dm_accept_partial_bio() dm: cleanup device_area_is_invalid() dm: move zone related code to dm-zone.c dm: Introduce dm_report_zones() dm: Forbid requeue of writes to zones dm: rearrange core declarations dm: introduce zone append emulation dm crypt: Fix zoned block device support block/blk-zoned.c | 119 +++++-- drivers/md/Makefile | 4 + drivers/md/dm-core.h | 65 ++++ drivers/md/dm-crypt.c | 31 +- drivers/md/dm-flakey.c | 7 +- drivers/md/dm-linear.c | 7 +- drivers/md/dm-table.c | 21 +- drivers/md/dm-zone.c | 654 ++++++++++++++++++++++++++++++++++ drivers/md/dm.c | 202 +++-------- drivers/md/dm.h | 30 +- include/linux/blk_types.h | 1 + include/linux/blkdev.h | 12 + include/linux/device-mapper.h | 9 +- 13 files changed, 955 insertions(+), 207 deletions(-) create mode 100644 drivers/md/dm-zone.c -- 2.31.1 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel
next reply other threads:[~2021-05-25 2:25 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-25 2:25 Damien Le Moal [this message] 2021-05-25 2:25 ` [dm-devel] [PATCH v4 00/11] dm: Improve zoned block device support Damien Le Moal 2021-05-25 2:25 ` [PATCH v4 01/11] block: improve handling of all zones reset operation Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 6:15 ` Chaitanya Kulkarni 2021-05-25 6:15 ` [dm-devel] " Chaitanya Kulkarni 2021-05-25 6:15 ` Chaitanya Kulkarni 2021-05-25 6:15 ` [dm-devel] " Chaitanya Kulkarni 2021-05-25 6:35 ` Damien Le Moal 2021-05-25 6:35 ` [dm-devel] " Damien Le Moal 2021-05-25 19:09 ` Himanshu Madhani 2021-05-25 19:09 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 02/11] block: introduce bio zone helpers Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 8:08 ` Christoph Hellwig 2021-05-25 8:08 ` [dm-devel] " Christoph Hellwig 2021-05-25 19:09 ` Himanshu Madhani 2021-05-25 19:09 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 03/11] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:09 ` Himanshu Madhani 2021-05-25 19:09 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 04/11] dm: Fix dm_accept_partial_bio() Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 8:12 ` Christoph Hellwig 2021-05-25 8:12 ` [dm-devel] " Christoph Hellwig 2021-05-25 19:10 ` Himanshu Madhani 2021-05-25 19:10 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 05/11] dm: cleanup device_area_is_invalid() Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 8:13 ` Christoph Hellwig 2021-05-25 8:13 ` [dm-devel] " Christoph Hellwig 2021-05-25 19:10 ` Himanshu Madhani 2021-05-25 19:10 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 06/11] dm: move zone related code to dm-zone.c Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:10 ` Himanshu Madhani 2021-05-25 19:10 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 07/11] dm: Introduce dm_report_zones() Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:11 ` Himanshu Madhani 2021-05-25 19:11 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 08/11] dm: Forbid requeue of writes to zones Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:13 ` Himanshu Madhani 2021-05-25 19:13 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 09/11] dm: rearrange core declarations Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:17 ` Himanshu Madhani 2021-05-25 19:17 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 10/11] dm: introduce zone append emulation Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:40 ` Himanshu Madhani 2021-05-25 19:40 ` [dm-devel] " Himanshu Madhani 2021-05-25 2:25 ` [PATCH v4 11/11] dm crypt: Fix zoned block device support Damien Le Moal 2021-05-25 2:25 ` [dm-devel] " Damien Le Moal 2021-05-25 19:44 ` Himanshu Madhani 2021-05-25 19:44 ` [dm-devel] " Himanshu Madhani
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=20210525022539.119661-1-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: 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.