Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbYCCMYh (ORCPT ); Mon, 3 Mar 2008 07:24:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752035AbYCCMY0 (ORCPT ); Mon, 3 Mar 2008 07:24:26 -0500 Received: from mo10.iij4u.or.jp ([210.138.174.78]:36699 "EHLO mo10.iij4u.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbYCCMYZ (ORCPT ); Mon, 3 Mar 2008 07:24:25 -0500 Date: Mon, 3 Mar 2008 21:17:28 +0900 To: htejun@gmail.com Cc: fujita.tomonori@lab.ntt.co.jp, tomof@acm.org, jens.axboe@oracle.com, James.Bottomley@HansenPartnership.com, efault@gmx.de, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, jgarzik@pobox.com Cc: fujita.tomonori@lab.ntt.co.jp Subject: Re: [PATCH] block: fix residual byte count handling From: FUJITA Tomonori In-Reply-To: <47CBC309.7090106@gmail.com> References: <47CB79E9.8000505@gmail.com> <20080303172623O.fujita.tomonori@lab.ntt.co.jp> <47CBC309.7090106@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20080303211727P.tomof@acm.org> X-Dispatcher: imput version 20040704(IM147) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1427 Lines: 26 On Mon, 03 Mar 2008 18:21:13 +0900 Tejun Heo wrote: > FUJITA Tomonori wrote: > >>> I can't see what changing the meaning of rq->data_len (and > >>> investigating all the block drivers) gives us. > >> No matter which way you go, you change the meaning of rq->data_len and > >> you MUST inspect rq->data_len usage whichever way you go. > > > > The patch doens't change that rq->data_len means the true data > > length. But yeah, it breaks rq->data_len == sum(sg). So it might break > > some drivers. > > Yeah, that's what I was saying. You end up breaking one of the two > assumptions. As sglist is getting modified for any driver if it has DMA > alignment set, whether rq->data_len is adjusted together or not, sglist > and data_len usages have to be audited. My patch (well, James' original approach) doesn't affect drivers that don't use drain buffer. rq->data_len still means the true data length and rq->data_len is equal to sum(sg) for them. So right now we need to audit only libata. But your patch changes the meaning of rq->data_len. It affects all the drivers. So it breaks non libata stuff, like the SMP handler. We need to audit all the drivers. -- 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/