Whamcloud - gitweb
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>