Whamcloud - gitweb
LU-4239 mdt: Optimize fid2path 17/10717/19
authorPatrick Farrell <paf@cray.com>
Mon, 1 Dec 2014 06:56:18 +0000 (00:56 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Dec 2014 16:58:23 +0000 (16:58 +0000)
commit825570b0b03e0fd70aba5400dedca4e6d94d5141
tree87824c6cfd10778555cdc814ee2a430eb539a6d1
parenta0b959c53d10bf3f0fd6b22de46397d0c7e5f667
LU-4239 mdt: Optimize fid2path

On directory paths 100 or more deep, fid2path
gives a spurious:
ioctl err -75: Value too large for defined data type

This bug occurs because all of the fids found during
a path lookup are stored in pli_fids and the
array is too small for very deep paths.

The stored fids are not used except for the last one, so
this array is not necessary.

Additionally, from Frank Zago:

It is not necessary to copy back and forth the fid, linkno,
and path.
Keep the input getinfo_fid2path, and remove

struct path_lookup_info

which was mostly a copy of getinfo_fid2path. This saves
several copies and a memory allocation.

The fid to be returned back to user space is stored in
fp->gf_fid.

Also added doxygen comments and replaced an 'EXIT' and
'return rc' with 'RETURN(rc)'.

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: I357b4d91b9c65a836d289d5815c763306ac34565
Reviewed-on: http://review.whamcloud.com/10717
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_handler.c
lustre/tests/sanity.sh