Skip to contentSkip to conversation

dm zoned: remove duplicated nr_rnd_zones increasement

PATCH RESEND In review Bob Liu 3 participants 5 messages Mar 24, 2020 – Mar 25, 2020

Subsystems (3)
lore
Share & tools
lore

Bob Liu

author
#0 lore raw

PATCH RESEND 1/1 dm zoned: remove duplicated nr_rnd_zones increasement

zmd->nr_rnd_zones was increased twice by mistake.
The other place:
1131 zmd->nr_useable_zones++;
1132 if (dmz_is_rnd(zone)) {

1133                         zmd->nr_rnd_zones++;
					^^^
Fixes 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
---
 drivers/md/dm-zoned-metadata.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/dm-zoned-metadata.c +0 -1
index 516c7b6..369de15 100644
@@ -1109,7 +1109,6 @@ static int dmz_init_zone(struct blk_zone *blkz, unsigned int idx, void *data)
 	switch (blkz->type) {
 	case BLK_ZONE_TYPE_CONVENTIONAL:
 		set_bit(DMZ_RND, &zone->flags);
-		zmd->nr_rnd_zones++;
 		break;
 	case BLK_ZONE_TYPE_SEQWRITE_REQ:
 	case BLK_ZONE_TYPE_SEQWRITE_PREF:
Signature · 1 line
2.9.5
maintainer
#1 lore raw

Hi

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag fixing commit: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target").

The bot has tested the following trees: v5.5.11, v5.4.27, v4.19.112, v4.14.174.

v5.5.11: Build OK!
v5.4.27: Failed to apply! Possible dependencies:
5eac3eb30c9a ("block: Remove partition support for zoned block devices") 6c1b1da58f8c ("block: add zone open, close and finish operations") 7fc8fb51a143 ("null_blk: clean up report zones")
ad512f2023b3 ("scsi: sd_zbc: add zone open, close, and finish support") c7a1d926dc40 ("block: Simplify REQ_OP_ZONE_RESET_ALL handling") c98c3d09fca4 ("block: cleanup the !zoned case in blk_revalidate_disk_zones") ceeb373aa6b9 ("block: Simplify report zones execution") d41003513e61 ("block: rework zone reporting")
d9dd73087a8b ("block: Enhance blk_revalidate_disk_zones()") dd85b4922de1 ("null_blk: return fixed zoned reads > write pointer") e3f89564c557 ("null_blk: clean up the block device operations")

v4.19.112: Failed to apply! Possible dependencies:

    515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation")
    5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    a91e138022bc ("block: Introduce blkdev_nr_zones() helper")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    d2e428e49eec ("scsi: sd_zbc: Reduce boot device scan and revalidate time")
    d41003513e61 ("block: rework zone reporting")
    e76239a3748c ("block: add a report_zones method")

v4.14.174: Failed to apply! Possible dependencies:

    08e18eab0c57 ("block: add bi_blkg to the bio for cgroups")
    30e5e929c7bf ("nvme: don't pass struct nvme_ns to nvme_config_discard")
    5238dcf4136f ("block: replace bio->bi_issue_stat with bio-specific type")
    53cfdc10a95d ("blk-throttle: fix null pointer dereference while throttling writeback IOs")
    5d47c89f29ea ("dm: clear all discard attributes in queue_limits when discards are disabled")
    8b904b5b6b58 ("block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    b889bf66d001 ("blk-throttle: track read and write request individually")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    c8b5fd031a30 ("mmc: block: Factor out mmc_setup_queue()")
    d41003513e61 ("block: rework zone reporting")
    d70675121546 ("block: introduce blk-iolatency io controller")
    e447a0151f7c ("zram: set BDI_CAP_STABLE_WRITES once")
    ed754e5deeb1 ("nvme: track shared namespaces")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
Reviewed-by
#2 lore raw
Quoted 52 lines · Sasha Levin

Hi

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag fixing commit: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target").

The bot has tested the following trees: v5.5.11, v5.4.27, v4.19.112, v4.14.174.

v5.5.11: Build OK!
v5.4.27: Failed to apply! Possible dependencies:
5eac3eb30c9a ("block: Remove partition support for zoned block devices") 6c1b1da58f8c ("block: add zone open, close and finish operations") 7fc8fb51a143 ("null_blk: clean up report zones")
ad512f2023b3 ("scsi: sd_zbc: add zone open, close, and finish support") c7a1d926dc40 ("block: Simplify REQ_OP_ZONE_RESET_ALL handling") c98c3d09fca4 ("block: cleanup the !zoned case in blk_revalidate_disk_zones") ceeb373aa6b9 ("block: Simplify report zones execution") d41003513e61 ("block: rework zone reporting")
d9dd73087a8b ("block: Enhance blk_revalidate_disk_zones()") dd85b4922de1 ("null_blk: return fixed zoned reads > write pointer") e3f89564c557 ("null_blk: clean up the block device operations")

v4.19.112: Failed to apply! Possible dependencies:

    515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation")
    5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    a91e138022bc ("block: Introduce blkdev_nr_zones() helper")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    d2e428e49eec ("scsi: sd_zbc: Reduce boot device scan and revalidate time")
    d41003513e61 ("block: rework zone reporting")
    e76239a3748c ("block: add a report_zones method")

v4.14.174: Failed to apply! Possible dependencies:

    08e18eab0c57 ("block: add bi_blkg to the bio for cgroups")
    30e5e929c7bf ("nvme: don't pass struct nvme_ns to nvme_config_discard")
    5238dcf4136f ("block: replace bio->bi_issue_stat with bio-specific type")
    53cfdc10a95d ("blk-throttle: fix null pointer dereference while throttling writeback IOs")
    5d47c89f29ea ("dm: clear all discard attributes in queue_limits when discards are disabled")
    8b904b5b6b58 ("block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    b889bf66d001 ("blk-throttle: track read and write request individually")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    c8b5fd031a30 ("mmc: block: Factor out mmc_setup_queue()")
    d41003513e61 ("block: rework zone reporting")
    d70675121546 ("block: introduce blk-iolatency io controller")
    e447a0151f7c ("zram: set BDI_CAP_STABLE_WRITES once")
    ed754e5deeb1 ("nvme: track shared namespaces")
Quoted 4 lines

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Fixing the conflict is simple. Bob or I can do it when Greg processes the patch once it is upstream ? Usually Greg sends a notice for such patches that do not apply cleanly.

For reference, the fixed up patch for 4.19 is below.

commit 48414897d7fde2c2a561a9f6d4b58b62ccb63e68 (HEAD -> linux-4.19.y)

Author: Bob Liu <[email protected]>
Date:   Tue Mar 24 21:22:45 2020 +0800

dm zoned: remove duplicated nr_rnd_zones increasement

zmd->nr_rnd_zones was increased twice by mistake. The other place:
1131 zmd->nr_useable_zones++;
1132 if (dmz_is_rnd(zone)) {
1133 zmd->nr_rnd_zones++;
^^^

Fixes 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
drivers/md/dm-zoned-metadata.c +0 -1
index 086a870087cf..53eb21343b11 100644
@@ -1105,7 +1105,6 @@ static int dmz_init_zone(struct dmz_metadata *zmd, struct dm_zone *zone,
 
        if (blkz->type == BLK_ZONE_TYPE_CONVENTIONAL) {
                set_bit(DMZ_RND, &zone->flags);
-               zmd->nr_rnd_zones++;
        } else if (blkz->type == BLK_ZONE_TYPE_SEQWRITE_REQ ||
                   blkz->type == BLK_ZONE_TYPE_SEQWRITE_PREF) {
                set_bit(DMZ_SEQ, &zone->flags);
Signature · 2 lines
Damien Le Moal
Western Digital Research
maintainer
#3 lore raw
In reply to Bob Liu

Hi

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag fixing commit: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target").

The bot has tested the following trees: v5.5.11, v5.4.27, v4.19.112, v4.14.174.

v5.5.11: Build OK!
v5.4.27: Failed to apply! Possible dependencies:
5eac3eb30c9a ("block: Remove partition support for zoned block devices") 6c1b1da58f8c ("block: add zone open, close and finish operations") 7fc8fb51a143 ("null_blk: clean up report zones")
ad512f2023b3 ("scsi: sd_zbc: add zone open, close, and finish support") c7a1d926dc40 ("block: Simplify REQ_OP_ZONE_RESET_ALL handling") c98c3d09fca4 ("block: cleanup the !zoned case in blk_revalidate_disk_zones") ceeb373aa6b9 ("block: Simplify report zones execution") d41003513e61 ("block: rework zone reporting")
d9dd73087a8b ("block: Enhance blk_revalidate_disk_zones()") dd85b4922de1 ("null_blk: return fixed zoned reads > write pointer") e3f89564c557 ("null_blk: clean up the block device operations")

v4.19.112: Failed to apply! Possible dependencies:

    515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation")
    5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    a91e138022bc ("block: Introduce blkdev_nr_zones() helper")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    d2e428e49eec ("scsi: sd_zbc: Reduce boot device scan and revalidate time")
    d41003513e61 ("block: rework zone reporting")
    e76239a3748c ("block: add a report_zones method")

v4.14.174: Failed to apply! Possible dependencies:

    08e18eab0c57 ("block: add bi_blkg to the bio for cgroups")
    30e5e929c7bf ("nvme: don't pass struct nvme_ns to nvme_config_discard")
    5238dcf4136f ("block: replace bio->bi_issue_stat with bio-specific type")
    53cfdc10a95d ("blk-throttle: fix null pointer dereference while throttling writeback IOs")
    5d47c89f29ea ("dm: clear all discard attributes in queue_limits when discards are disabled")
    8b904b5b6b58 ("block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    b889bf66d001 ("blk-throttle: track read and write request individually")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    c8b5fd031a30 ("mmc: block: Factor out mmc_setup_queue()")
    d41003513e61 ("block: rework zone reporting")
    d70675121546 ("block: introduce blk-iolatency io controller")
    e447a0151f7c ("zram: set BDI_CAP_STABLE_WRITES once")
    ed754e5deeb1 ("nvme: track shared namespaces")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
maintainer
#4 lore raw
In reply to Bob Liu

Hi

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag fixing commit: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target").

The bot has tested the following trees: v5.5.11, v5.4.27, v4.19.112, v4.14.174.

v5.5.11: Build OK!
v5.4.27: Failed to apply! Possible dependencies:
5eac3eb30c9a ("block: Remove partition support for zoned block devices") 6c1b1da58f8c ("block: add zone open, close and finish operations") 7fc8fb51a143 ("null_blk: clean up report zones")
ad512f2023b3 ("scsi: sd_zbc: add zone open, close, and finish support") c7a1d926dc40 ("block: Simplify REQ_OP_ZONE_RESET_ALL handling") c98c3d09fca4 ("block: cleanup the !zoned case in blk_revalidate_disk_zones") ceeb373aa6b9 ("block: Simplify report zones execution") d41003513e61 ("block: rework zone reporting")
d9dd73087a8b ("block: Enhance blk_revalidate_disk_zones()") dd85b4922de1 ("null_blk: return fixed zoned reads > write pointer") e3f89564c557 ("null_blk: clean up the block device operations")

v4.19.112: Failed to apply! Possible dependencies:

    515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation")
    5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    a91e138022bc ("block: Introduce blkdev_nr_zones() helper")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    d2e428e49eec ("scsi: sd_zbc: Reduce boot device scan and revalidate time")
    d41003513e61 ("block: rework zone reporting")
    e76239a3748c ("block: add a report_zones method")

v4.14.174: Failed to apply! Possible dependencies:

    08e18eab0c57 ("block: add bi_blkg to the bio for cgroups")
    30e5e929c7bf ("nvme: don't pass struct nvme_ns to nvme_config_discard")
    5238dcf4136f ("block: replace bio->bi_issue_stat with bio-specific type")
    53cfdc10a95d ("blk-throttle: fix null pointer dereference while throttling writeback IOs")
    5d47c89f29ea ("dm: clear all discard attributes in queue_limits when discards are disabled")
    8b904b5b6b58 ("block: Use blk_queue_flag_*() in drivers instead of queue_flag_*()")
    a2d6b3a2d390 ("block: Improve zone reset execution")
    b889bf66d001 ("blk-throttle: track read and write request individually")
    bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()")
    bf5054569653 ("block: Introduce blk_revalidate_disk_zones()")
    c8b5fd031a30 ("mmc: block: Factor out mmc_setup_queue()")
    d41003513e61 ("block: rework zone reporting")
    d70675121546 ("block: introduce blk-iolatency io controller")
    e447a0151f7c ("zram: set BDI_CAP_STABLE_WRITES once")
    ed754e5deeb1 ("nvme: track shared namespaces")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha