Re: [RFC PATCH 7/11] relay - Remove padding-related code from relay_read()/relay_splice_read() et al.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Monday, September 29, 2008 - 9:27 am

* Tom Zanussi (zanussi@comcast.net) wrote:

Hi Tom,

This question might sound a bit dumb, but I'll ask anyway : why do you
implement a splice_read rather than a splice_write in relay ?

splice_read allows reading information from a file or from a socket to a
pipe, while splice_write does the opposite.

So if you implement a relay splice_read, you probably consider the
relay buffers to be a "file", so you really have to send the information
to a pipe, and then you have to use this pipe to send the data
elsewhere.

My first reaction when looking at the splice implementation is that what
we would really want is a splice_write which would take the data from a
pipe (actually, we would have to write an actor which would make the
relay buffer behave like a pipe) and write it either to disk or to a
socket.

Is there something I am misunderstanding here ?

Thanks,

Mathieu


-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC PATCH 7/11] relay - Remove padding-related code f ..., Mathieu Desnoyers, (Mon Sep 29, 9:27 am)
[RFC PATCH 0/1] relay revamp v5, Tom Zanussi, (Sun Oct 5, 10:22 pm)
[RFC PATCH 1/1] relay revamp v5, Tom Zanussi, (Sun Oct 5, 10:22 pm)
Re: [RFC PATCH 1/1] relay revamp v5, Jens Axboe, (Mon Oct 6, 12:40 am)
Re: [RFC PATCH 1/1] relay revamp v5, Tom Zanussi, (Mon Oct 6, 9:55 pm)