Mateusz Guzik 8cdcbe085a
vfs: support caching symlink lengths in inodes
When utilized it dodges strlen() in vfs_readlink(), giving about 1.5%
speed up when issuing readlink on /initrd.img on ext4.

Filesystems opt in by calling inode_set_cached_link() when creating an
inode.

The size is stored in a new union utilizing the same space as i_devices,
thus avoiding growing the struct or taking up any more space.

Churn-wise the current readlink_copy() helper is patched to accept the
size instead of calculating it.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20241120112037.822078-2-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-12-02 11:24:50 +01:00
..
2024-10-11 14:34:16 -04:00
2023-10-18 15:30:47 -07:00
2024-11-26 19:21:05 -08:00
2024-11-26 19:21:05 -08:00
2024-10-11 14:34:16 -04:00
2022-12-14 13:42:09 -08:00
2024-11-26 19:21:05 -08:00
2023-11-12 22:54:42 -05:00
2024-11-26 19:21:05 -08:00