Skip to content

block: flag zoned disks with GENHD_FL_NO_PART - #1148

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1147082=>linus-master
Open

block: flag zoned disks with GENHD_FL_NO_PART#1148
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1147082=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block: flag zoned disks with GENHD_FL_NO_PART
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1147082

@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147082
version: 1

@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147082
version: 1

@blktests-ci
blktests-ci Bot force-pushed the series/1147082=>linus-master branch from a4fa614 to 78ef710 Compare August 17, 2026 16:37
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 60442a3 to 3df366e Compare August 19, 2026 05:25
Zoned block devices do not support partitions. However, the partition
table is nevertheless still inspected, and any partition found ignored
with a warning in add_partition(). While this is generally not a problem,
and in fact beneficial to the user as it indicates an invalid use of a
zoned block device, scanning for a partition table on the device may
result in issuing read operations to offline zones (e.g. after a disk head
is depopulated for disks that support head management operations).

Since partitions are ignored anyway, completely disable partition scanning
for zoned gendisks by setting the flag GENHD_FL_NO_PART in __add_disk().
The existing check in add_partition() is left as-is to ensure that we
still get a warning if for whatever reason, despite GENHD_FL_NO_PART, we
still endup trying to add partitions.

Flagging zoned disks with GENHD_FL_NO_PART also has the benefit to expose
through sysfs the ext_range attribute with the value of 1 instead of the
default DISK_MAX_PARTS, thus correctly advertizing the fact that zoned
disks do not support partitions.

Fixes: 5eac3eb ("block: Remove partition support for zoned block devices")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
@blktests-ci

blktests-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147082
version: 1

@blktests-ci
blktests-ci Bot force-pushed the series/1147082=>linus-master branch from 78ef710 to ebffd7e Compare August 19, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant