From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 03/11] block: add rq->resid_len Date: Tue, 12 May 2009 18:53:46 +0300 Message-ID: <4A099B8A.1020401@panasas.com> References: <1241423927-11871-1-git-send-email-tj@kernel.org> <1241423927-11871-4-git-send-email-tj@kernel.org> <4A06DFAB.40205@panasas.com> <4A0767E5.5050205@kernel.org> <4A080C9D.9000109@panasas.com> <4A08C26E.80801@kernel.org> <4A093782.80701@panasas.com> <4A093C54.2060706@kernel.org> <4A0946D6.4010405@panasas.com> <4A094A11.2030300@kernel.org> <4A09589A.5030800@panasas.com> <4A0993BA.7090505@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A0993BA.7090505@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Tejun Heo Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, jeff@garzik.org, linux-ide@vger.kernel.org, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, bzolnier@gmail.com, petkovbb@googlemail.com, sshtylyov@ru.mvista.com, mike.miller@hp.com, Eric.Moore@lsi.com, stern@rowland.harvard.edu, fujita.tomonori@lab.ntt.co.jp, zaitcev@redhat.com, Geert.Uytterhoeven@sonycom.com, sfr@canb.auug.org.au, grant.likely@secretlab.ca, paul.clements@steeleye.com, tim@cyberelk.net, jeremy@xensource.com, adrian@mcmen.demon.co.uk, oakad@yahoo.com, dwmw2@infradead.org, schwidefsky@de.ibm.com, ballabio_dario@emc.com, davem@davemloft.net, rusty@rustcorp.com.au, Markus.Lidel@shadowconnect.com, Doug Gilbert , "Darrick J. Wong" List-Id: linux-ide@vger.kernel.org On 05/12/2009 06:20 PM, Tejun Heo wrote: > Boaz Harrosh wrote: > >> The solution to this, I think, is that the bouncing layer should >> receive a residual count, and not bounce anything beyond what's >> transferred. (On reads, writes does nothing), and zero-out the >> rest. This of course means that all block drivers make sure residual >> is properly set, the way it should as explained in this >> thread. (SCSI does the right thing where it can, for example see >> scsi_execute()) > > Umm... shouldn't the request just be successfully finished with > positive residue count and with sense data if necessary? Block layer > request failure means, and has always meant, complete failure. > I see, however if so then bouncing must take into consideration the residual count in the successful case, so not to copy garbage bytes. And drivers audited to make sure residual is set accordingly. I wish we would set resid_len to data_len at begining and let drivers reset that on success properly, like SCSI does. I'll look at it farther when I have a bit of time. Finally I see a distinct separate usage for the request->error member? > Thanks. > Thanks Boaz