mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] splice: fix wrong __splice_from_pipe() usage
Date: Mon, 16 Jul 2007 21:35:52 +0900	[thread overview]
Message-ID: <87hco4v847.fsf@duaron.myhome.or.jp> (raw)
In-Reply-To: <20070716111528.GD5195@kernel.dk> (Jens Axboe's message of "Mon\, 16 Jul 2007 13\:15\:28 +0200")

Jens Axboe <jens.axboe@oracle.com> writes:

>> nfsd_vfs_read() path.
>> 
>> nfsd_vfs_read()
>>     splice_direct_to_actor()
>>         while(len) {
>>             do_splice_to()                     [update sd->pos]
>>                 -> generic_file_splice_read()  [read from sd->pos]
>>             nfsd_direct_splice_actor()
>>                 -> __splice_from_pipe()        [update sd->pos]
>>         }
>> 
>> do_splice_to() updates sd->pos for read, and pass updated sd to
>> __splice_from_pipe(), and __splice_from_pipe() updates sd->pos for
>> write. So, next do_splice_to() read from wrong position.
>
> Ah, I see. Copying the structure over would work, but it seems like a
> big work-around for something that is essentially bad behaviour in the
> splice core for direct splicing.
>
> Can you check if this works for you?

Simple test was done. The patch works for me.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2007-07-16 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16  0:38 OGAWA Hirofumi
2007-07-16  6:34 ` Jens Axboe
2007-07-16 10:53   ` OGAWA Hirofumi
2007-07-16 11:15     ` Jens Axboe
2007-07-16 12:35       ` OGAWA Hirofumi [this message]
2007-07-16 12:37         ` Jens Axboe

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=87hco4v847.fsf@duaron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®