If without object name knowledge, I do not think OSD can resolve that totally by itself inside. It may be work for ZFS backend, but does not work for current ldiskfs backend. I do not think you will like the idea to change lookup-by-FID interfaces to pass some name related hint for that.
In this case, what is the reason for the MGS must call lookup-by-FID for the special local file "seq-xxx-lastid", why not lookup-by-name?
I agree with you that it will be much helpful for the developer that if the OSD can properly process lookup-by-FID internally, in spite of whether the device restored from file-level backup or not, but current osd-ldiskfs OI design does not support it, that is why we did OI scrub. Changing current osd-ldiskfs OI design and implementation will not be small work, and will introduce some compatibility issues. I do not think we can do that is a short time. From a long view, we maybe can do. But as a workable solution, I more like using lookup-by-name for the MGS to locate "seq-xxx-lastid".
http://review.whamcloud.com/#change,4106 landed to master