Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
Lustre 2.15.0
-
None
-
3
-
9223372036854775807
Description
It appears that glibc is using st_blksize returned by the client to allocate the buffer used by readdir() internally when it calls getdents():
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/opendir.c
110 /* Increase allocation if requested, but not if the value appears to 111 be bogus. It will be between 32Kb and 1Mb. */ 112 size_t allocation = MIN (MAX ((size_t) statp->st_blksize, (size_t) 113 allocation_size), (size_t) max_buffer_size);
Since the client is already doing RPCs of up to 1MB to the MDS to fetch the directory data to the client, we may as well return all of these entries to userspace at the same time.