This entry point copies a byte range from one regular file to another
or within one file in a single file system.
invp
and
outvp
can refer to the same file.
For this case, the byte ranges defined by
*inoff,
*outoff,
and
*len
will not overlap.
The arguments are:
| invp
|
| |
The vnode of the input file.
|
| inoff
|
| |
A pointer to the file offset for the input file.
|
| outvp
|
| |
The vnode of the output file.
|
| outoff
|
| |
A pointer to the file offset for the output file.
|
| len
|
| |
A pointer to the byte count for the copy.
|
| flags
|
| |
Flags, should be set to 0 for now.
|
| incred
|
| |
The credentials used to read
invp.
|
| outcred
|
| |
The credentials used to write
outvp.
|
| fsize_td
|
| |
The thread pointer to be passed to vn_rlimit_fsize().
This will be
NULL
for a server thread without limits, such as for the NFS
server or
curthread
otherwise.
|
On entry and on return, the
inoff
and
outoff
arguments point to the locations of the file offsets.
These file offsets should be updated by the number of bytes copied.
The
len
argument points to the location that stores the number of bytes
to be copied.
Upon a successful return
len
will be updated to the number of bytes actually copied.
Normally, this will be the number of bytes requested to be copied,
however a copy of fewer bytes than requested is permitted.
This does not necessarily indicate that the copy reached EOF on the input file.
However, if the value pointed to by the
len
argument is zero upon a successful return,
it indicates that the offset pointed to by
inoff
is at or beyond EOF on the input file.