[Gluster-devel] NetBSD's read-subvol-entry.t spurious failures explained

Emmanuel Dreyfus manu at netbsd.org
Mon Mar 9 08:42:29 UTC 2015


On Fri, Mar 06, 2015 at 05:55:34PM +0530, Ravishankar N wrote:
> After bringing brick0 up, and performing "ls abc/def", does afr_do_readdir()
> get called for "def"?
> If it does,  then AFR will send lookup to both bricks via
> afr_inode_refresh() 

I think I tracked down the real problem. I now understand there is some
kind of race condition where we can enter afr_replies_interpret() with 
inode's ia_gfid and ia_type unset (that is, set to IA_INVAL). As a result, 
this code in afr_replies_interpret() will fail to go the
AFR_ENTRY_TRANSACTION route: 

        afr_accused_fill (this, replies[i].xdata, data_accused,
                          (inode->ia_type == IA_IFDIR) ?
                           AFR_ENTRY_TRANSACTION : AFR_DATA_TRANSACTION);

The accused array does not take into account the entry bits in 
trusted.afr.patchy-client-0 from brick1, and brick0 is considered clean.

Using replies[i].poststat.ia_type  instead of inode->ia_type fixes
the problem. here is the patch for that. Please review:
http://review.gluster.org/9831/

-- 
Emmanuel Dreyfus
manu at netbsd.org


More information about the Gluster-devel mailing list