readdir: supply dir_context.count as readdir buffer size hint
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 16 Apr 2025 10:44:55 +0000 (12:44 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 29 May 2025 10:31:23 +0000 (12:31 +0200)
commit467e245d47e6662a4cbf4184d9e6d0b1b120c0bf
treefd2d80f962cc098e4352343bd3f85400da457041
parentc31f91c6af96a5eb0632f4aee8d4e39cad7d7559
readdir: supply dir_context.count as readdir buffer size hint

This is a preparation for large readdir buffers in fuse.

Simply setting the fuse buffer size to the userspace buffer size should
work, the record sizes are similar (fuse's is slightly larger than libc's,
so no overflow should ever happen).

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
fs/exportfs/expfs.c
fs/overlayfs/readdir.c
fs/readdir.c
include/linux/fs.h