[LU-16821] Increase directory st_blksize for glibc Created: 11/May/23 Updated: 31/Aug/23 Resolved: 31/Aug/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Andreas Dilger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 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. |
| Comments |
| Comment by Gerrit Updater [ 11/May/23 ] |
|
"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50960 |
| Comment by Gerrit Updater [ 31/Aug/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50960/ |
| Comment by Peter Jones [ 31/Aug/23 ] |
|
Landed for 2.16 |