[Gluster-devel] Can self-healing be based on lookup and readdir requests ?

Xavier Hernandez xhernandez at datalab.es
Tue Mar 13 10:27:07 UTC 2012

Hello again,

I'm trying to implement self-healing functionality in my translator. 
I've been browsing source code (basically mount/fuse and cluster/afr 
translators) and I see that fuse seems to always make a lookup call each 
time it sees a file or directory, at least the first time. If that's 
true in all cases, I'm thinking in putting almost all self-healing logic 
into the lookup callback, and use readdir to detect directory 
discrepancies. The only thing that I may miss are extended attributes, 
that I will only detect if they are corrupted when a getxattr 
referencing them will be called.

Browsing cluster/afr source I see that self-healing logic is 
distributed among different functions. Specially I see some checks in 
open fop. Why these checks can't be done in the lookup fop ? is there 
any advantage doing it this way ? is there a combination that can't be 
checked in the lookup previous to the open ?

It would be nice if there were some special dictionary key to retrieve 
all extended attributes. This way would be easier to detect and 
regenerate earlier the extended attributes (from lookup).

Thank you very much,


More information about the Gluster-devel mailing list