Skip to content

ublk: rework partition handling#585

Open
blktests-ci[bot] wants to merge 4 commits intolinus-master_basefrom
series/1056476=>linus-master
Open

ublk: rework partition handling#585
blktests-ci[bot] wants to merge 4 commits intolinus-master_basefrom
series/1056476=>linus-master

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Feb 23, 2026

Pull request for series with
subject: ublk: rework partition handling
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1056476

@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 23, 2026

Upstream branch: 6de23f8
series: https://patchwork.kernel.org/project/linux-block/list/?series=1056476
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 23, 2026

Upstream branch: 6de23f8
series: https://patchwork.kernel.org/project/linux-block/list/?series=1056476
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from a7c16f4 to a6d87df Compare February 23, 2026 12:40
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from c90f83b to c475e20 Compare February 25, 2026 11:14
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 25, 2026

Upstream branch: 7dff99b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1056476
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from a6d87df to 5260c17 Compare February 25, 2026 11:19
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 27, 2026

Upstream branch: 7dff99b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot added V2 and removed V1 V1-ci-fail labels Feb 27, 2026
@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 5260c17 to 83578cd Compare February 27, 2026 15:13
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from c475e20 to 14f6b99 Compare February 27, 2026 16:24
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 27, 2026

Upstream branch: a75cb86
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 83578cd to e863da2 Compare February 27, 2026 16:36
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 14f6b99 to 856dc37 Compare February 27, 2026 22:07
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 27, 2026

Upstream branch: 4d349ee
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from e863da2 to aee2fa4 Compare February 27, 2026 22:15
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 28, 2026

Upstream branch: 4d349ee
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from aee2fa4 to a68d189 Compare February 28, 2026 10:19
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 856dc37 to 40967f0 Compare March 2, 2026 09:22
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 2, 2026

Upstream branch: 11439c4
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from a68d189 to ed780c1 Compare March 2, 2026 09:30
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 40967f0 to d4e9bad Compare March 2, 2026 23:54
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 3, 2026

Upstream branch: af4e9ef
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from ed780c1 to 6eac9d6 Compare March 3, 2026 00:02
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 4, 2026

Upstream branch: af4e9ef
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 6eac9d6 to 9275b85 Compare March 4, 2026 08:00
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from d0e1bed to 6b51c57 Compare March 4, 2026 09:34
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 4, 2026

Upstream branch: 0031c06
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 9275b85 to 722149a Compare March 4, 2026 09:44
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 6b51c57 to 78036b2 Compare March 4, 2026 19:57
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 4, 2026

Upstream branch: ecc64d2
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 722149a to 89c257a Compare March 4, 2026 20:06
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 78036b2 to bbb3394 Compare March 5, 2026 12:20
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 5, 2026

Upstream branch: c107785
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 89c257a to e039c4b Compare March 5, 2026 12:29
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from bbb3394 to 901a429 Compare March 5, 2026 21:37
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 5, 2026

Upstream branch: 5ee8dbf
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from e039c4b to d24de16 Compare March 5, 2026 21:46
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 901a429 to 1f19ba6 Compare March 10, 2026 06:29
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 10, 2026

Upstream branch: 1f318b9
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from d24de16 to 7773a38 Compare March 10, 2026 06:40
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 1f19ba6 to e79276a Compare March 11, 2026 08:02
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 11, 2026

Upstream branch: None
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 7773a38 to 2601411 Compare March 11, 2026 08:15
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from e79276a to 0dd9afc Compare March 12, 2026 01:40
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 12, 2026

Upstream branch: 80234b5
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 2601411 to 7956b12 Compare March 12, 2026 02:11
@blktests-ci blktests-ci bot force-pushed the linus-master_base branch from 0dd9afc to 2e598ed Compare March 13, 2026 07:29
Currently the code misuse GD_SUPPRESS_PART_SCAN flag
as it tries to use it as a switch for the auto partition scan.
To fully disable creation of partitions GENHD_FL_NO_PART must
be used, switch code to use it instead GD_SUPPRESS_PART_SCAN.

Rules for partitions become:
 - Unprivileged daemons - never scan partitions, they have
GENHD_FL_NO_PART always set - they are devices without partitions.

 - Trusted daemons - by default have partitions enabled,
automatic initial scan can be disabled via UBLK_F_NO_AUTO_PART_SCAN flag.
Partitions can be disabled via UBLK_F_NO_PARTITIONS flag.

Rework the code to work as described above:
- remove checks in ublk_partition_scan_work and rely on
the caller to schedule the work only if it has to be done.
- set GENHD_FL_NO_PART on unprivileged devices
- set GENHD_FL_NO_PART depending on UBLK_F_NO_PARTITIONS on trusted
devices.

Fixes: 8443e20 ("ublk: add UBLK_F_NO_AUTO_PART_SCAN feature flag")
Signed-off-by: Alexander Atanasov <alex@zazolabs.com>
To support new flag - UBLK_F_NO_PARTITIONS
add kublk argument:
-m, --no_partitions - disable partitions on trusted devices
Add short argument for  UBLK_F_NO_AUTO_PART_SCAN
-p, --no_auto_part_scan - disable initial partition scan

Update test cases to use the new arguments

Fix long lines while at it.

Signed-off-by: Alexander Atanasov <alex@zazolabs.com>
Add section about partition handling on ublk devices.
Document UBLK_F_NO_PARTITIONS and UBLK_F_NO_AUTO_PART_SCAN.

Add section for kublk to be used as reference.

Update extenal github links - repos have moved to ublk-org
and README is renamed to README.rst

Signed-off-by: Alexander Atanasov <alex@zazolabs.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Arguments are handled via flags so
remove unused no_auto_part_scan bitfield.

Signed-off-by: Alexander Atanasov <alex@zazolabs.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 13, 2026

Upstream branch: 0257f64
series: https://patchwork.kernel.org/project/linux-block/list/?series=1059052
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1056476=>linus-master branch from 7956b12 to 893d947 Compare March 13, 2026 07:47
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