Commit a2f4c1a
selftests: ublk: kublk: improve behavior on init failure
Some failure modes are handled poorly by kublk. For example, if ublk_drv
is built as a module but not currently loaded into the kernel, ./kublk
add ... just hangs forever. This happens because in this case (and a few
others), the worker process does not notify its parent (via a write to
the shared eventfd) that it has tried and failed to initialize, so the
parent hangs forever. Fix this by ensuring that we always notify the
parent process of any initialization failure, and have the parent print
a (not very descriptive) log line when this happens.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250603-ublk_init_fail-v1-1-87c91486230e@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 43a67dd commit a2f4c1a
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | | - | |
| 1115 | + | |
1116 | 1116 | | |
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
1123 | | - | |
| 1123 | + | |
| 1124 | + | |
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
1129 | | - | |
| 1130 | + | |
| 1131 | + | |
1130 | 1132 | | |
1131 | 1133 | | |
1132 | 1134 | | |
| |||
1136 | 1138 | | |
1137 | 1139 | | |
1138 | 1140 | | |
1139 | | - | |
| 1141 | + | |
| 1142 | + | |
1140 | 1143 | | |
1141 | 1144 | | |
1142 | 1145 | | |
1143 | 1146 | | |
1144 | 1147 | | |
1145 | 1148 | | |
1146 | | - | |
| 1149 | + | |
| 1150 | + | |
1147 | 1151 | | |
1148 | 1152 | | |
1149 | 1153 | | |
1150 | 1154 | | |
1151 | 1155 | | |
1152 | 1156 | | |
1153 | | - | |
| 1157 | + | |
| 1158 | + | |
1154 | 1159 | | |
1155 | 1160 | | |
1156 | 1161 | | |
1157 | 1162 | | |
1158 | | - | |
1159 | | - | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1160 | 1167 | | |
1161 | | - | |
1162 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1163 | 1172 | | |
1164 | 1173 | | |
1165 | 1174 | | |
| |||
1200 | 1209 | | |
1201 | 1210 | | |
1202 | 1211 | | |
1203 | | - | |
| 1212 | + | |
| 1213 | + | |
1204 | 1214 | | |
1205 | 1215 | | |
1206 | 1216 | | |
| |||
1262 | 1272 | | |
1263 | 1273 | | |
1264 | 1274 | | |
| 1275 | + | |
| 1276 | + | |
1265 | 1277 | | |
1266 | 1278 | | |
1267 | 1279 | | |
| |||
0 commit comments