]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: stop always overwriting ->mnt_stat in VFS_STATFS
authormjg <mjg@FreeBSD.org>
Sun, 18 Aug 2019 18:40:12 +0000 (18:40 +0000)
committermjg <mjg@FreeBSD.org>
Sun, 18 Aug 2019 18:40:12 +0000 (18:40 +0000)
commit9744ff9b12366826e01e7719082090543f045ad2
treef20058d5c0a7eab527343ee765d14be70508767c
parentd9cc3fc0b8a915ccfad2ab83defaf29613f74b5b
vfs: stop always overwriting ->mnt_stat in VFS_STATFS

The struct is already populated on each mount (and remount). Fields are either
constant or not used by filesystem in the first place.

Some infrequently used functions use it to avoid having to allocate a new buffer
and are left alone.

The current code results in an avoidable copying single-threaded and significant
cache line bouncing multithreaded

While here deduplicate initial filling of the struct.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21317
sys/kern/vfs_mount.c
sys/kern/vfs_syscalls.c