| To: | Nate Diller <nate@xxxxxxxxx> |
|---|---|
| Subject: | [xfs-masters] Re: [PATCH -mm 4/10][RFC] aio: convert aio_complete to file_endio_t |
| From: | David Brownell <david-b@xxxxxxxxxxx> |
| Date: | Mon, 15 Jan 2007 21:53:46 -0800 |
| Cc: | Nate Diller <nate.diller@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxx>, Benjamin LaHaise <bcrl@xxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Suparna Bhattacharya <suparna@xxxxxxxxxx>, Kenneth W Chen <kenneth.w.chen@xxxxxxxxx>, David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-aio@xxxxxxxxx, xfs-masters@xxxxxxxxxxx |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Disposition:Message-Id:Content-Type:Content-Transfer-Encoding; b=Cllq+YNFkR1o5K8c3WfWO7RBKoOmW7z2Yn2FrK84tfDX0X/eve86UDIzt9LzaoELBMjWMsheWHoEuS+Tggeve9FP2TTh2A5lvyhNt6mrzbXAoWGrRXoJidPPyOtmz1OZP2tQJ8tmupUZo5wsbujPp+hZwi+A1V/uwkG9ZAwXS/U= ; |
| In-reply-to: | <20070116015450.9764.38389.patchbomb.py@nate-64.agami.com> |
| References: | <20070116015450.9764.38389.patchbomb.py@nate-64.agami.com> |
| Reply-to: | xfs-masters@xxxxxxxxxxx |
| Sender: | xfs-masters-bounce@xxxxxxxxxxx |
| User-agent: | KMail/1.7.1 |
On Monday 15 January 2007 5:54 pm, Nate Diller wrote:
> --- a/drivers/usb/gadget/inode.c 2007-01-12 14:42:29.000000000 -0800
> +++ b/drivers/usb/gadget/inode.c 2007-01-12 14:25:34.000000000 -0800
> @@ -559,35 +559,32 @@ static int ep_aio_cancel(struct kiocb *i
> return value;
> }
>
> -static ssize_t ep_aio_read_retry(struct kiocb *iocb)
> +static int ep_aio_read_retry(struct kiocb *iocb)
> {
> struct kiocb_priv *priv = iocb->private;
> - ssize_t len, total;
> - int i;
> + ssize_t total;
> + int i, err = 0;
>
> /* we "retry" to get the right mm context for this: */
>
> /* copy stuff into user buffers */
> total = priv->actual;
> - len = 0;
> for (i=0; i < priv->nr_segs; i++) {
> ssize_t this = min((ssize_t)(priv->iv[i].iov_len), total);
>
> if (copy_to_user(priv->iv[i].iov_base, priv->buf, this)) {
> - if (len == 0)
> - len = -EFAULT;
> + err = -EFAULT;
Discarding the capability to report partial success, e.g. that the first N
bytes were properly transferred? I don't see any virtue in that change.
Quite the opposite in fact.
I think you're also expecting that if N bytes were requested, that's always
how many will be received. That's not true for packetized I/O such as USB
isochronous transfers ... where it's quite legit (and in some cases routine)
for the other end to send packets that are shorter than the maximum allowed.
Sending a zero length packet is not the same as sending no packet at all,
for another example.
|
| Previous by Date: | [xfs-masters] Re: 2.6.20-rc5: known unfixed regressions, David Chinner |
|---|---|
| Next by Date: | [xfs-masters] Re: [PATCH -mm 9/10][RFC] aio: usb gadget remove aio file ops, David Brownell |
| Previous by Thread: | [xfs-masters] [PATCH -mm 4/10][RFC] aio: convert aio_complete to file_endio_t, Nate Diller |
| Next by Thread: | [xfs-masters] Re: [PATCH -mm 4/10][RFC] aio: convert aio_complete to file_endio_t, Nate Diller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |