Whamcloud - gitweb
LU-4219 mdd: limit os_namelen to the max of NAME_MAX 76/8276/5
authorJian Yu <jian.yu@intel.com>
Mon, 25 Nov 2013 06:23:58 +0000 (14:23 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 Dec 2013 13:55:05 +0000 (13:55 +0000)
commitd6debe2e9f3cd8d9fce9da66b2accefe9cecde1b
tree571abe2773120c9c2af43a3d824605550cfcf31c
parent1c30099de6d74e038cd3d269c2a64b8eeb3c91ca
LU-4219 mdd: limit os_namelen to the max of NAME_MAX

While running pathconf(".", _PC_NAME_MAX) on ldiskfs-based
Lustre filesystem, it returns 255 (NAME_MAX). However, on
zfs-based Lustre filesystem, it returns 256 (MAXNAMELEN).
Since Lustre can not handle the name length large than
NAME_MAX, this patch limits the value of os_namelen in
mdd_statfs() to the max of NAME_MAX.

Test-Parameters: envdefinitions=SLOW=yes \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
ostcount=2 testlist=posix

Lustre-commit: 7d197837e0d7eb5f40a928a8f6c57270493b8996
Lustre-change: http://review.whamcloud.com/8217

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I6de2f4c45f33c362b5ff61575f0ebc75477c6b48
Reviewed-on: http://review.whamcloud.com/8276
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdd/mdd_device.c