Whamcloud - gitweb
LU-18783 llite: ensure dentry name within ll_namelen 36/58336/13
authorJames Simmons <jsimmons@infradead.org>
Thu, 10 Apr 2025 14:41:12 +0000 (10:41 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 25 Apr 2025 00:51:34 +0000 (00:51 +0000)
commit6210f4ae96633b95fc62c8fddc7d9517b5bb7e5c
tree256441fd6f633eee4c5f99c3043d224b85ceccb0
parent41bb553efcf58fcfb6bdd427a41c655c191480e0
LU-18783 llite: ensure dentry name within ll_namelen

Some of the pjdfstest POSIX filename length tests are failing.
This is due to the test expecting a ENAMETOOLONG error to be
reported instead of the current ENOENT error.

Add a test for the dentry name len to ensure its not longer than
sbi->ll_namelen. pjdfstest is expecting the largest file name size
to be NAME_MAX but newer ZFS versions allow names up to 1024 chars.
Ensure client limits filenames to be within NAME_MAX and OSD limit.

Add a tunable parameter llite.*.namelen_max to set this if needed.

Fixes: 7d197837e0 ("LU-4219 mdd: limit os_namelen to the max of NAME_MAX")
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I6bd872d69aca173d61ac55a2f8ffc505efb3f462
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58336
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/llite/namei.c