[...]
: Data that were read but not written should probably be lost. If we
: don't like this, we could pass pointer/len pair so kernel could write
: unwritten data somewhere. But I think we should better lose that data.
I'm not sure this was obvious - let me be clear. The kernel interfaces
are pull() and push(), i.e., you pull a cookie representing a list of
pages from one file descriptor and you push the cookie on another file
descriptor.
There are a lot of reasons for doing it this way, your error handling
comments are one of them.
Other reasons include things like an ftp that 'knows' that the disks
are striped and you need a 2MB chunk of data to get the stripe going;
it can do this
for (got = 0; got < 2MB; got = bytes(cookie)) {
cookie = pull(socket_fd, args, cookie);
}
push(disk_fd, cookie);
splice() as a interface is just syntactic sugar to make easy things
easy.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu