Whamcloud - gitweb
LU-4954 mdd: validate names before create, link, and rename 11/10111/2
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 25 Apr 2014 23:00:48 +0000 (18:00 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 1 May 2014 19:05:25 +0000 (19:05 +0000)
commit341f9c97c5926cb37ca51de047c70e0fa44b3f1e
treefbbc9f394630f7a867f43ca281ff0e5bdeae14b6
parent72f0d504e6a96058bedca9ea6741172fdd88970e
LU-4954 mdd: validate names before create, link, and rename

In lu_name_is_valid() check that the length of the ln_name is equal to
ln_namelen and check that there are no embedded slashes. Add
mdd_name_check() which calls lu_name_is_valid() and check against the
mdd ENAMETOOLONG limit. Call mdd_name_check() from
mdd_create_sanity_check(), mdd_link_sanity_check() and mdd_rename().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I66413b796177f042fc9bd87e98338de9e5125cae
Reviewed-on: http://review.whamcloud.com/10111
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lu_object.h
lustre/mdd/mdd_dir.c