mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
In guestfs_readdir(), the daemon currently sends each XDR-encoded "guestfs_int_dirent" to the library with a separate send_file_write() call. Determine the largest encoded size (from the longest filename that a "guestfs_int_dirent" could carry, from readdir()'s "struct dirent"), and batch up the XDR encodings until the next encoding might not fit in GUESTFS_MAX_CHUNK_SIZE. Call send_file_write() only then. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1674392 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20220502085601.15012-3-lersek@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
3.9 KiB
3.9 KiB