Commit 13bb08f
Make ltotape thread-safe
The ltotape driver uses a thread-shared ltotape_scsi_io_type structure
that contains fields involved in SCSI operations: cdb, cdb_length, data,
data_length, data_direction, actual_data_length, sensedata, sense_length,
timeout_ms.
As a result the driver is not re-entrant, while libltfs expects it to
be. We fix that situation by adding a wrapper layer that copies the
ltotape_scsi_io_type structure to the stack when doing SCSI operations,
so that the offending fields are not shared among threads anymore.1 parent e9f031c commit 13bb08f
File tree
6 files changed
+2028
-150
lines changed- src/tape_drivers
- linux/ltotape
- netbsd/ltotape
- osx/ltotape
6 files changed
+2028
-150
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3228 | 3228 | | |
3229 | 3229 | | |
3230 | 3230 | | |
3231 | | - | |
3232 | | - | |
3233 | | - | |
3234 | 3231 | | |
3235 | 3232 | | |
3236 | 3233 | | |
3237 | 3234 | | |
3238 | 3235 | | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
3239 | 3239 | | |
3240 | 3240 | | |
3241 | 3241 | | |
| |||
3254 | 3254 | | |
3255 | 3255 | | |
3256 | 3256 | | |
3257 | | - | |
3258 | 3257 | | |
3259 | | - | |
3260 | 3258 | | |
3261 | 3259 | | |
3262 | 3260 | | |
| |||
3271 | 3269 | | |
3272 | 3270 | | |
3273 | 3271 | | |
3274 | | - | |
3275 | 3272 | | |
3276 | | - | |
3277 | 3273 | | |
3278 | 3274 | | |
3279 | 3275 | | |
| |||
3289 | 3285 | | |
3290 | 3286 | | |
3291 | 3287 | | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | 3288 | | |
3297 | 3289 | | |
3298 | 3290 | | |
3299 | | - | |
3300 | 3291 | | |
3301 | | - | |
3302 | | - | |
3303 | | - | |
3304 | | - | |
3305 | | - | |
3306 | | - | |
3307 | 3292 | | |
3308 | 3293 | | |
| 3294 | + | |
3309 | 3295 | | |
3310 | 3296 | | |
3311 | 3297 | | |
| |||
0 commit comments