Commit 1af9a9d
committed
scsi: target: core: Generate correct identifiers for PR OUT transport IDs
JIRA: https://issues.redhat.com/browse/RHEL-111938
Fix target_parse_pr_out_transport_id() to return a string representing
the transport ID in a human-readable format (e.g., naa.xxxxxxxx...) for
various SCSI protocol types (SAS, FCP, SRP, SBP).
Previously, the function returned a pointer to the raw binary buffer,
which was incorrectly compared against human-readable strings, causing
comparisons to fail. Now, the function writes a properly formatted
string into a buffer provided by the caller. The output format depends
on the transport protocol:
* SAS: 64-bit identifier, "naa." prefix.
* FCP: 64-bit identifier, colon separated values.
* SBP: 64-bit identifier, no prefix.
* SRP: 128-bit identifier, "0x" prefix.
* iSCSI: IQN string.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Link: https://lore.kernel.org/r/20250714133738.11054-1-mlombard@redhat.com
Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 6e0f6aa)
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>1 parent df26a6e commit 1af9a9d
File tree
3 files changed
+60
-25
lines changed- drivers/target
3 files changed
+60
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
261 | 290 | | |
262 | 291 | | |
263 | 292 | | |
264 | | - | |
| 293 | + | |
| 294 | + | |
265 | 295 | | |
266 | 296 | | |
267 | 297 | | |
| |||
282 | 312 | | |
283 | 313 | | |
284 | 314 | | |
285 | | - | |
| 315 | + | |
286 | 316 | | |
287 | 317 | | |
288 | 318 | | |
| |||
306 | 336 | | |
307 | 337 | | |
308 | 338 | | |
309 | | - | |
| 339 | + | |
310 | 340 | | |
311 | 341 | | |
312 | 342 | | |
| |||
339 | 369 | | |
340 | 370 | | |
341 | 371 | | |
342 | | - | |
| 372 | + | |
| 373 | + | |
343 | 374 | | |
344 | 375 | | |
345 | 376 | | |
| |||
387 | 418 | | |
388 | 419 | | |
389 | 420 | | |
390 | | - | |
391 | | - | |
| 421 | + | |
| 422 | + | |
392 | 423 | | |
393 | | - | |
394 | | - | |
395 | 424 | | |
396 | 425 | | |
397 | 426 | | |
398 | 427 | | |
399 | 428 | | |
400 | 429 | | |
401 | | - | |
| 430 | + | |
402 | 431 | | |
403 | | - | |
404 | 432 | | |
| 433 | + | |
| 434 | + | |
405 | 435 | | |
406 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
407 | 440 | | |
408 | 441 | | |
409 | 442 | | |
410 | | - | |
| 443 | + | |
411 | 444 | | |
412 | 445 | | |
413 | | - | |
| 446 | + | |
414 | 447 | | |
415 | 448 | | |
416 | 449 | | |
417 | 450 | | |
418 | | - | |
| 451 | + | |
419 | 452 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | | - | |
| 1481 | + | |
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
| 1486 | + | |
1486 | 1487 | | |
1487 | 1488 | | |
1488 | 1489 | | |
| |||
1571 | 1572 | | |
1572 | 1573 | | |
1573 | 1574 | | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
| |||
3153 | 3154 | | |
3154 | 3155 | | |
3155 | 3156 | | |
3156 | | - | |
| 3157 | + | |
3157 | 3158 | | |
3158 | 3159 | | |
3159 | 3160 | | |
3160 | 3161 | | |
3161 | 3162 | | |
3162 | 3163 | | |
| 3164 | + | |
3163 | 3165 | | |
3164 | 3166 | | |
3165 | 3167 | | |
| |||
3278 | 3280 | | |
3279 | 3281 | | |
3280 | 3282 | | |
3281 | | - | |
3282 | | - | |
3283 | | - | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
3284 | 3286 | | |
3285 | 3287 | | |
3286 | 3288 | | |
| |||
0 commit comments