Skip to contentSkip to conversation

SCSI partial completions?

DISCUSSION Jeff Garzik 2 participants 2 messages May 8, 2003 – May 9, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

I could have sworn I saw some code in drivers/scsi/scsi*.c that implied partial completions were supported.

Let's imagine that I receive a Scsi_Cmnd that wants to write N sectors.
Time passes, my error handler kicks in, and I realize that I was only
able to write N/2 sectors.

How do I tell the SCSI layer that N/2 sectors were written successfully?

Thanks,

Jeff

#1 lore raw
Quoted 7 lines · Jeff Garzik

I could have sworn I saw some code in drivers/scsi/scsi*.c that implied partial completions were supported.

Let's imagine that I receive a Scsi_Cmnd that wants to write N sectors.
Time passes, my error handler kicks in, and I realize that I was only
able to write N/2 sectors.

Quoted 5 lines

How do I tell the SCSI layer that N/2 sectors were written successfully?

Thanks,

Jeff

Like the sd.c code for handling MEDIUM_ERROR? And corresponding code in scsi_io_completion, where we call scsi_end_request() with requeue (the last argument) set to 1.

-- Patrick Mansfield