1XDR_TRUNCATE_ENCODE(9)         Linux Networking         XDR_TRUNCATE_ENCODE(9)
2
3
4

NAME

6       xdr_truncate_encode - truncate an encode buffer
7

SYNOPSIS

9       void xdr_truncate_encode(struct xdr_stream * xdr, size_t len);
10

ARGUMENTS

12       xdr
13           pointer to xdr_stream
14
15       len
16           new length of buffer
17

DESCRIPTION

19       Truncates the xdr stream, so that xdr->buf->len == len, and xdr->p
20       points at offset len from the start of the buffer, and head, tail, and
21       page lengths are adjusted to correspond.
22
23       If this means moving xdr->p to a different buffer, we assume that that
24       the end pointer should be set to the end of the current page, except in
25       the case of the head buffer when we assume the head buffer's current
26       length represents the end of the available buffer.
27
28       This is *not* safe to use on a buffer that already has inlined page
29       cache pages (as in a zero-copy server read reply), except for the
30       simple case of truncating from one position in the tail to another.
31
33Kernel Hackers Manual 3.10         June 2019            XDR_TRUNCATE_ENCODE(9)
Impressum