FreeBSD/src eb6ac6f (r312291)sys/cam/ctl scsi_ctl.c ctl.c, sys/cam/scsi scsi_all.c

Make CTL frontends report kern_data_resid for under-/overruns.

It seems like kern_data_resid was never really implemented.  This change
finally does it.  Now frontends update this field while transferring data,
while CTL/backends getting it can more flexibly handle the result.
At this point behavior should not change significantly, still reporting
errors on write overrun, but that may be changed later, if we decide so.

CAM target frontend still does not properly handle overruns due to CAM API
limitations.  We may need to add some fields to struct ccb_accept_tio to
pass information about initiator requested transfer size(s).

MFC after:      2 weeks
DeltaFile
+51-53sys/cam/ctl/scsi_ctl.c
+10-46sys/cam/ctl/ctl.c
+10-16sys/cam/ctl/ctl_backend_block.c
+10-16sys/cam/ctl/ctl_backend_ramdisk.c
+7-18sys/cam/ctl/ctl_frontend_ioctl.c
+5-17sys/cam/ctl/ctl_frontend_cam_sim.c
+10-9sys/cam/ctl/ctl_frontend_iscsi.c
+5-9sys/cam/ctl/ctl_tpc_local.c
+12-0sys/cam/ctl/ctl_error.c
+0-11sys/cam/ctl/ctl_tpc.c
+1-1sys/cam/scsi/scsi_all.c
+1-0sys/cam/ctl/ctl_error.h
+122-19612 files

UnifiedSplitRaw