diff options
author | phk <phk@FreeBSD.org> | 2008-02-03 15:54:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2008-02-03 15:54:41 +0000 |
commit | 13132840a1ae0f962ec527dbcb06f4ab9ff6e629 (patch) | |
tree | e8aa792bfeae3fe74b00888ee40dba346efe1d5b /lib | |
parent | f42ebbd1b7ffd44040dfa547061f44f206a30e0e (diff) | |
download | FreeBSD-src-13132840a1ae0f962ec527dbcb06f4ab9ff6e629.zip FreeBSD-src-13132840a1ae0f962ec527dbcb06f4ab9ff6e629.tar.gz |
Give sendfile(2) a SF_SYNC flag which makes it wait until all mbufs
referencing the files VM pages are returned from the network stack,
making changes to the file safe.
This flag does not guarantee that the data has been transmitted to the
other end.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/sendfile.2 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 93420f6..322971f 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -103,7 +103,9 @@ variable pointed to by .Pp The .Fa flags -argument has one possible value: +argument is a bitmap of these values: +.Bl -item -offset indent +.It .Dv SF_NODISKIO . This flag causes any .Fn sendfile @@ -112,6 +114,17 @@ return .Er EBUSY . Busy servers may benefit by transferring requests that would block to a separate I/O worker thread. +.It +.Dv SF_MNOWAIT . +(description missing) +.It +.Dv SF_SYNC , +.Nm +sleeps until the network stack no longer references the VM pages +of the file, making subsequent modifications to it safe. +Please note that this is not a guarantee that the data has actually +been sent. +.El .Pp When using a socket marked for non-blocking I/O, .Fn sendfile |