linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vandrovec <petr@vmware.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH #upstream-fixes 2/2] libata-scsi: improve rbuf handling for simulated commands
Date: Mon, 28 Apr 2008 01:23:19 -0700	[thread overview]
Message-ID: <48158977.60609@vmware.com> (raw)
In-Reply-To: <48158826.8070209@gmail.com>

Tejun Heo wrote:
> Buffer length handling in simulated commands is error-prone and full
> of bugs.  There are a number of places where necessary length checks
> are missing and if the output buffer is passed in as sglist, nothing
> works.
> 
> This patch adds a static buffer ata_scsi_rbuf which is sufficiently
> large to handle the larges output from simulated commands (4k
> currently), let all simulte functions write to the buffer and removes
> all length checks as we know that there always is enough buffer space.
> Copying in (for ATAPI inquiry fix up) and out are handled by
> ata_scsi_copy_rbuf() behind ata_scsi_rbuf_get/put() interface and
> sglist is handled properly.
> 
> This patch is inspired from buffer length check fix patch from Petr
> Vandrovec.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Petr Vandrovec <petr@vmware.com>

Looks much better than my lots of ifs.  Thanks.
						Petr


  reply	other threads:[~2008-04-28  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28  8:16 [PATCH #upstream-fixes 1/2] libata-scsi: clean up inquiry / mode sense related functions Tejun Heo
2008-04-28  8:17 ` [PATCH #upstream-fixes 2/2] libata-scsi: improve rbuf handling for simulated commands Tejun Heo
2008-04-28  8:23   ` Petr Vandrovec [this message]
2008-04-28  8:37   ` FUJITA Tomonori
2008-04-28  8:48     ` [PATCH #upstream-fixes 2/2 UPDATED] " Tejun Heo
2008-04-29  6:18       ` Jeff Garzik

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=48158977.60609@vmware.com \
    --to=petr@vmware.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).