ublk: rework partition handling#585
ublk: rework partition handling#585blktests-ci[bot] wants to merge 4 commits intolinus-master_basefrom
Conversation
|
Upstream branch: 6de23f8 |
|
Upstream branch: 6de23f8 |
a7c16f4 to
a6d87df
Compare
c90f83b to
c475e20
Compare
|
Upstream branch: 7dff99b |
a6d87df to
5260c17
Compare
|
Upstream branch: 7dff99b |
5260c17 to
83578cd
Compare
c475e20 to
14f6b99
Compare
|
Upstream branch: a75cb86 |
83578cd to
e863da2
Compare
14f6b99 to
856dc37
Compare
|
Upstream branch: 4d349ee |
e863da2 to
aee2fa4
Compare
|
Upstream branch: 4d349ee |
aee2fa4 to
a68d189
Compare
856dc37 to
40967f0
Compare
|
Upstream branch: 11439c4 |
a68d189 to
ed780c1
Compare
40967f0 to
d4e9bad
Compare
|
Upstream branch: af4e9ef |
ed780c1 to
6eac9d6
Compare
|
Upstream branch: af4e9ef |
6eac9d6 to
9275b85
Compare
d0e1bed to
6b51c57
Compare
|
Upstream branch: 0031c06 |
9275b85 to
722149a
Compare
6b51c57 to
78036b2
Compare
|
Upstream branch: ecc64d2 |
722149a to
89c257a
Compare
78036b2 to
bbb3394
Compare
|
Upstream branch: c107785 |
89c257a to
e039c4b
Compare
bbb3394 to
901a429
Compare
|
Upstream branch: 5ee8dbf |
e039c4b to
d24de16
Compare
901a429 to
1f19ba6
Compare
|
Upstream branch: 1f318b9 |
d24de16 to
7773a38
Compare
1f19ba6 to
e79276a
Compare
|
Upstream branch: None |
7773a38 to
2601411
Compare
e79276a to
0dd9afc
Compare
|
Upstream branch: 80234b5 |
2601411 to
7956b12
Compare
0dd9afc to
2e598ed
Compare
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>
|
Upstream branch: 0257f64 |
7956b12 to
893d947
Compare
Pull request for series with
subject: ublk: rework partition handling
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1056476