On Wed, 2008-02-27 at 03:24 +0100, Mike Galbraith wrote:Hm. After rummaging around some more in both kernel and userland, I think this patchlet is not only functional, but (random accident) technically correct. What the heck, let's see if it flies... snippet from userland: /* * Return the residual DMA count for last command. * If this count is < 0, then a DMA overrun occured. */ EXPORT int scg_getresid(scgp) SCSI *scgp; { return (scgp->scmd->resid); } This function is used all over the place in cdrecord to determine transfer size. (patchlet takes wing, and... goes splat?) Fix CD burning regression introduced by 6b00769fe1502b4ad97bb327ef7ac971b208bfb5. raw_data_len must be updated to reflect residual data upon IO completion because it is used by blk_complete_sghdr_rq() to set hdr->resid which eventually becomes visible to userland. Signed-off-by: Mike Galbraith <efault@gmx.de> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ba21d97..7a6f784 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -871,7 +871,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) scsi_end_bidi_request(cmd); return; } - req->data_len = scsi_get_resid(cmd); + req->data_len = req->raw_data_len = scsi_get_resid(cmd); } BUG_ON(blk_bidi_rq(req)); /* bidi not support for !blk_pc_request yet */ -Mike --
| Peter Zijlstra | Re: Quad core CPUs loaded at only 50% when running a CPU and mmap intensive multi-... |
| Satyam Sharma | [-mm patchset] War on warnings |
| Izik Eidus | [PATCH 0/4] ksm - dynamic page sharing driver for linux |
| Renato S. Yamane | Error -71 on device descriptor read/all |
git: | |
| Martin Langhoff | Handling large files with GIT |
| Wincent Colaiuta | Rebase/cherry-picking idea |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Joe Fiorini | Undo git-rm without commit? |
| Christian Weisgerber | Re: libiconv problem |
| Peter | OpenBSD as Virtualbox guest |
| Brandon Lee | DELL PERC 5iR slow performance |
| Martin Toft | Trying to compile cwm on Linux |
| Alexey Dobriyan | [PATCH 01/53] xfrm: initialise xfrm_policy_gc_work statically |
| Arjan van de Ven | Printing the driver name as part of the netdev watchdog message |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
| Inaky Perez-Gonzalez | [PATCH 03/39] wimax: constants and definitions to interact with user space |
