Re: [PATCH] sendfile removal



On Thu, 31 May 2007 12:33:16 +0200
Jens Axboe <jens.axboe@xxxxxxxxxx> wrote:

Hi,

This patch removes the ->sendfile() hook from the file_operations
structure, and replaces the sys_sendfile() mechanism to be based on
->splice_read() instead. There should be no functional changes.


- retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
+ fl = 0;
+ if (in_file->f_flags & O_NONBLOCK)
+ fl = SPLICE_F_NONBLOCK;
+
+ retval = do_splice_direct(in_file, ppos, out_file, count, fl);

I like this, but are you sure it wont break user land ?

Some applications might react badly if sendfile() returns EAGAIN ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [GIT PULL] Ext3 latency fixes
    ... On Sat, 4 Apr 2009, Jens Axboe wrote: ... Big nack on this patch. ... Perhaps there's a need for one sophisticated io scheduler that gets ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)
  • Re: 2G memory split
    ... On Tue, Jan 10 2006, Bernd Eckenfels wrote: ... the patch would now look like this: ... Jens Axboe ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)
  • Re: [Repost] IDE error 2.6.7-rc3-mm2 and 2.6.8-rc1-mm1
    ... On Thursday 22 July 2004 11:39 am, Jens Axboe wrote: ... to do with your patch, it _does_ lineup with my applying your patch and ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)
  • Re: [PATCH] bio: make use of bvec_nr_vecs
    ... On Sat, Jul 26 2008, Denis ChengRq wrote: ... Submit a patch :-) ... Jens Axboe ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)
  • Re: [PATCH] sendfile removal
    ... Jens Axboe wrote: ... This patch removes the ->sendfilehook from the file_operations ... There should be no functional changes. ...
    (Linux-Kernel)