On Tue, Apr 18, 2017 at 3:59 PM, Rock Lee <rockdotlee@xxxxxxxxx> wrote: > Hi, Amir > I am a little confused. redirect_fd feature needs to wrt a file handle typo: redirect_fh (not to be confused with consistent_fd) > to a xattr in upper dir, but what are the advantages ? Because it is > faster to lookup than ordinary lookup ? Could you please give me some > hints about why redirect by file handle is faster ? There are some use cases where lookup by fh could be faster than by path because it just needs one inode lookup (by ino) as opposed to name lookup per path element (e.g. in path /a/b/c/d/e/f/g/h/i/g/k) and also redirect by path is limited to certain path length (which is less than MAX_PATH). But to be honest, those optimizations are not the reason I needed redirect_fh. My reasons are related to overlayfs snapshots and it not easy to explain. In my recent submission of "stable inode" feature, redirect_fh is used to track the origin of non-dir copy up files. That is an easier motivation to explain and that is the strongest advantage that overlayfs gains from redirect_fh. > > BTW, there are too few comments in the overlayfs code which makes me > very hard to understand. > I can only say that my comment to code ratio is only slightly better than Miklos's ;-) I'll do my best to improve. Thanks, Amir. -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html