Hi Andreas,
We hit this (minor) problem again on another directory tree when using lfs find. Like the first time, the root cause is clearly a bug in the user's application or script, as the path has a repetitive pattern in it. However, sometimes, surprisingly, we found valid files at the very end of the path, whose absolute paths are above 4096 bytes, so could be useful if lfs find does actually report all of them (eg. when we want to empty an OST and make sure no files are remaining on it). I tried your simple patch to avoid lfs find failure and I confirm it's working to get rid of the error.
Alternatively, one could decide that this error is actually valid and properly reported, and that these paths should be fixed first, as they are indeed too long for PATH_MAX. In that case, I think it would be nice to add the path of the directory to the error message, otherwise currently it's difficult to identify these long paths; something simple like this does seem to work for me:
Landed for 2.15