login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
4
Re: [PATCH] block: fix residual byte count handling
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: James Bottomley
Subject:
Re: [PATCH] block: fix residual byte count handling
Date: Tuesday, March 4, 2008 - 11:27 am
On Wed, 2008-03-05 at 01:42 +0900, Tejun Heo wrote:
quoted text
> Tejun Heo wrote: > > Tejun Heo wrote: > >> FUJITA Tomonori wrote: > >>>> Aiee... device going down after timing out on READ_DISC_INFO. That's > >>>> gruesome. Can you please try the other patches? > >>> Tejun, I thought that libata needs a fix for sum(sg) != rq->data_len. No? > >> The extra_len you added to qc->nbytes should be it. The only other > >> place to pay attention is the ATAPI transfer chunk size and your patch > >> seems to get it right. > >> > >>> Now Jens' git tree should work with all the non libata stuff, ide, > >>> firewire, bsg, etc. But I'm not sure about libata. > >> With the second patch, all others should be fine no matter what. I'll > >> go check libata part again. > > > > I can reproduce the problem here and it's very weird. I'll report back > > when I know more. > > Okay, I got it. Heh, it turns out SCSI and/or block layer is not > ready for rq->data_len != sum(sg). When adjusted command completes, > SCSI midlayer completes the command with rq->data_len for PC commands > which eventually ends up in __end_that_request_first(). As there are > extra sg area left after completing rq->data_len, blk layer says so to > SCSI layer and SCSI layer retries the command only with the appended > area. > > The following patch gets the writing going. I really think it's a > serious mistake to break rq->data_len == sum(sg). If we break > rq->data_len == requested size, the worst bugs are giving wrong size > when issuing commands to application layer of devices which is > relatively easy to spot and not all that command anyway. Breaking > rq->data_len == sum(sg), bugs will be in internal mechanics, DMA > engine programming and transport layer. Oh well... > > diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c > index fecba05..32439ac 100644 > --- a/drivers/scsi/scsi.c > +++ b/drivers/scsi/scsi.c > @@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd) > "Notifying upper driver of completion " > "(result %x)\n", cmd->result)); > > - good_bytes = scsi_bufflen(cmd); > + good_bytes = scsi_bufflen(cmd) + cmd->request->data_len;
This doesn't look right. scsi_bufflen(cmd) is req->data_len for PC commands ... did you mean to add extra_len here? James --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
regression: CD burning (k3b) went broke
, Mike Galbraith
, (Thu Feb 21, 1:42 am)
Re: regression: CD burning (k3b) went broke
, Jens Axboe
, (Fri Feb 22, 12:32 am)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Sat Feb 23, 12:42 am)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Sun Feb 24, 12:54 am)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Tue Feb 26, 2:48 am)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Tue Feb 26, 6:36 am)
Re: regression: CD burning (k3b) went broke
, Andrew Morton
, (Tue Feb 26, 4:08 pm)
Re: regression: CD burning (k3b) went broke
, Jeff Garzik
, (Tue Feb 26, 5:46 pm)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Tue Feb 26, 7:24 pm)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Tue Feb 26, 7:58 pm)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Tue Feb 26, 11:00 pm)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Wed Feb 27, 12:07 am)
Re: regression: CD burning (k3b) went broke
, Tejun Heo
, (Thu Feb 28, 12:43 am)
Re: regression: CD burning (k3b) went broke
, Mike Galbraith
, (Thu Feb 28, 1:20 am)
[PATCH] block: fix residual byte count handling
, Tejun Heo
, (Thu Feb 28, 1:50 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Thu Feb 28, 8:35 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Thu Feb 28, 8:46 am)
Re: [PATCH] block: fix residual byte count handling
, James Bottomley
, (Fri Feb 29, 9:47 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Fri Feb 29, 1:11 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Fri Feb 29, 11:17 pm)
Re: [PATCH] block: fix residual byte count handling
, James Bottomley
, (Sat Mar 1, 8:19 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Sun Mar 2, 7:52 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Christie
, (Sun Mar 2, 11:46 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Sun Mar 2, 7:40 pm)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Sun Mar 2, 8:27 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Sun Mar 2, 8:59 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Sun Mar 2, 9:09 pm)
[PATCH 1/2] block: fix residual byte count handling
, Tejun Heo
, (Sun Mar 2, 11:08 pm)
[PATCH] block: separate out padding from alignment
, Tejun Heo
, (Sun Mar 2, 11:10 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 1:26 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 2:21 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 5:17 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 6:38 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 6:50 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 6:55 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 7:01 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 7:22 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 7:52 am)
Re: [PATCH] block: separate out padding from alignment
, James Bottomley
, (Mon Mar 3, 11:27 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 3:44 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Mon Mar 3, 7:11 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Mon Mar 3, 7:32 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 1:53 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 1:59 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 2:06 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 2:22 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 2:29 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 2:30 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 2:35 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 2:40 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 2:46 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 5:37 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 5:39 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 5:40 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 5:43 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 5:45 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 5:58 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 6:03 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 6:30 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 6:50 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 7:25 am)
Re: [PATCH] block: fix residual byte count handling
, James Bottomley
, (Tue Mar 4, 9:04 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 9:17 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 9:42 am)
Re: [PATCH] block: fix residual byte count handling
, walt
, (Tue Mar 4, 10:34 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 10:59 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 11:17 am)
Re: [PATCH] block: fix residual byte count handling
, Boaz Harrosh
, (Tue Mar 4, 11:26 am)
Re: [PATCH] block: fix residual byte count handling
, James Bottomley
, (Tue Mar 4, 11:27 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 11:29 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 11:33 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 11:35 am)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 11:35 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 11:45 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 11:45 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 11:46 am)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 11:49 am)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 11:54 am)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 12:19 pm)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 12:25 pm)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 12:26 pm)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 12:28 pm)
Re: [PATCH] block: fix residual byte count handling
, Mike Galbraith
, (Tue Mar 4, 12:33 pm)
Re: [PATCH] block: fix residual byte count handling
, Jens Axboe
, (Tue Mar 4, 12:34 pm)
Re: [PATCH] block: fix residual byte count handling
, Kiyoshi Ueda
, (Tue Mar 4, 12:42 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 4:33 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 4:54 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Tue Mar 4, 5:26 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Tue Mar 4, 5:44 pm)
[PATCH] blk: missing add of padded bytes to io completion ...
, Boaz Harrosh
, (Wed Mar 5, 3:16 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Mike Galbraith
, (Wed Mar 5, 5:28 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Jens Axboe
, (Wed Mar 5, 5:33 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Boaz Harrosh
, (Wed Mar 5, 5:46 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Jens Axboe
, (Wed Mar 5, 5:48 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Tejun Heo
, (Wed Mar 5, 6:45 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Jens Axboe
, (Wed Mar 5, 6:51 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Tejun Heo
, (Wed Mar 5, 7:08 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Boaz Harrosh
, (Wed Mar 5, 7:46 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Tejun Heo
, (Wed Mar 5, 8:11 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, James Bottomley
, (Wed Mar 5, 8:21 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, FUJITA Tomonori
, (Wed Mar 5, 9:41 pm)
Re: [PATCH] block: fix residual byte count handling
, FUJITA Tomonori
, (Wed Mar 5, 9:56 pm)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, FUJITA Tomonori
, (Wed Mar 5, 10:02 pm)
Re: [PATCH] block: fix residual byte count handling
, Tejun Heo
, (Wed Mar 5, 10:02 pm)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Jens Axboe
, (Thu Mar 6, 6:41 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Tejun Heo
, (Thu Mar 6, 5:07 pm)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, FUJITA Tomonori
, (Fri Mar 7, 8:07 am)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, Tejun Heo
, (Fri Mar 7, 6:06 pm)
Re: [PATCH] blk: missing add of padded bytes to io complet ...
, FUJITA Tomonori
, (Thu Mar 20, 5:54 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate