Re: PATCH: sendfile() checks f_op.sendpage() instead off_op.splice_write() wrongly

From: Jens Axboe
Date: Mon Oct 19 2009 - 04:26:03 EST


On Mon, Oct 19 2009, Changli Gao wrote:
> sendfile(2) checks f_op.sendpage() instead of f_op.splice_write() wrongly.
>
> sendfile(2) was reworked with the splice infrastructure, but it still
> checks f_op.sendpage() instead of f_op.splice_write() wrongly. Although
> if f_op.sendpage() exists, f_op.splice_write() always exists at the same
> time currently, the assumption will be broken in future silently. This
> patch also brings a side effect: sendfile(2) can work with any output
> file, which supports splice_write() not only mmap(2).

Question is, if the check should just be dropped completely, since we
use fallback default handlers if the fs doesn't have
->splice_read/->splice_write().

--
Jens Axboe

--
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/