Re: Update of file offset on write() etc. is non-atomic with I/O

From: Linus Torvalds
Date: Mon Mar 03 2014 - 18:54:37 EST


On Mon, Mar 3, 2014 at 3:39 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> do_sendfile() is also there and this one is even more unpleasant ;-/
> We probably can ignore that one (until POSIX learns of its existence),
> thouhg...

Yeah, I saw the do_sendfile one and decided we don't care. Not only is
is out of POSIX spec (so if you break it you get to keep both pieces),
the whole sendfile() thing is a bit of a hack.

But we could take the f_pos_lock explicitly in do_sendfile for the
!ppos case if we decide we care. The error handling is the main
annoyance.

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