LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeff Garzik <jeff@garzik.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ata_sg_setup_one vs ata_sg_setup?
Date: Wed, 14 Nov 2007 14:25:44 +0200	[thread overview]
Message-ID: <473AE948.4090702@panasas.com> (raw)
In-Reply-To: <200711141540.58658.rusty@rustcorp.com.au>

On Wed, Nov 14 2007 at 6:40 +0200, Rusty Russell <rusty@rustcorp.com.au> wrote:
> Hi Jeff,
> 
>     Was looking through libata, and it seems to me that ata_sg_setup is a
> superset of ata_sg_setup_one.  Am I missing something?  Seems like it could
> be simplified.
> 
> My machine never seems to do an ata_sg_setup_one, so this patch isn't really
> tested...
> 
It's not only your machine, it's every ones machines. Since 2.6.18.
But in 2.6.24 the last code user of ata_sg_setup_one was also removed
from libata-scsi.c :
(http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e10b8c3f5f23188e065b1845ba732570eca007fe)
Please see in above commit's comment about this issue.

> Thanks,
> Rusty.
> ---
> Subject: libata: fold ata_queued_cmd single and sg logic
> 
> libata separates the single buffer case from the scatterlist case
> internally.  It's not clear that this is necessary.
> 
> Remove the ATA_QCFLAG_SINGLE flag, and buf_virt pointer, and always
> initialize qc->nbytes in ata_sg_init().
> 
> It's possible that the ATA_QCFLAG_SG and ATA_QCFLAG_DMAMAP flags could
> be entirely removed, and we could use whether qc->__sg is NULL or not.
> 
Yes these flags can be removed and you will find that qc->__sg will
never be NULL, unless it is a DMA_NONE command.

> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> diff -r 8b1075c7ad47 drivers/ata/libata-core.c
> --- a/drivers/ata/libata-core.c	Tue Nov 13 21:00:47 2007 +1100
> +++ b/drivers/ata/libata-core.c	Wed Nov 14 15:31:07 2007 +1100
> @@ -1648,16 +1648,8 @@ unsigned ata_exec_internal_sg(struct ata
<snip>

Thanks for doing this.

Boaz

  reply	other threads:[~2007-11-14 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14  4:40 Rusty Russell
2007-11-14 12:25 ` Boaz Harrosh [this message]
2007-11-15  4:08 ` Tejun Heo
2007-11-15 12:36   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=473AE948.4090702@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --subject='Re: [PATCH] ata_sg_setup_one vs ata_sg_setup?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).