Writing to user file from kernel

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue Nov 5 20:17:03 EST 2013


On Tue, 05 Nov 2013 16:03:57 -0700, neha naik said:
>    'vfs_read' is strightforward but i don't understand the api
> 'splice_direct_to_actor'. Is there any documentation which will
> explain it to me and where it is used. Because as i see it you can
> read a file using either of the two 'vfs_read' or
> 'splice_direct_to_actor'. But, which is better.

Depends what yoiu're trying to do.  They do different things. read()
is pretty much what Unixoid systems have been doing for 4 decades now.
splice() allows you to connect a socket or a pipe directly to a file

https://en.wikipedia.org/wiki/Splice_%28system_call%29
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131105/c9dabbdd/attachment.bin 


More information about the Kernelnewbies mailing list