Details
-
Bug
-
Resolution: Not a Bug
-
Minor
-
None
-
None
-
None
-
3
-
16139
Description
llapi_fid2path can (or should) enumerate all the files associated with a fid, by using the linkno parameter. This is supported by lfs.
However when the number of hard link is big, this is no longer true. For instance, create a file, and many hardlinks to it:
cd /mnt/lustre/test/ touch foo count=1; while [[ $count -le 180 ]]; do ln foo alinktofoo$count; (( count++ )) ; done
Get the fid of the file
# ~/lustre-cleanup/lustre/utils/lfs path2fid ./foo [0x200000400:0x8b8:0x0]
and then call fid2path on it:
# ~/lustre-cleanup/lustre/utils/lfs fid2path /mnt/lustre/ 0x200000400:0x8b8:0x0
The output will be something like
/mnt/lustre/test/foo /mnt/lustre/test/alinktofoo1 /mnt/lustre/test/alinktofoo2 /mnt/lustre/test/alinktofoo3 /mnt/lustre/test/alinktofoo4 ....... /mnt/lustre/test/alinktofoo130 /mnt/lustre/test/alinktofoo131 /mnt/lustre/test/alinktofoo132
Only the first 133 entries are returned, leaving out 47.
The interesting thing is that if the names of the links are longer (replace alinktofoo$count with averylinktofoo$count), then even less names will be returned.
Potential impact on existing programs is unknown.