Created attachment 1115892 [details] Experimental patch Description of problem: With FreeBSD UFS, stat returns indefinite value in st_rdev, for non-character or non-block files. (i.e. regular files) This prevents disperse volume healing, with following errors. [2016-01-15 01:01:54.466105] W [ec-combine.c:76:ec_iatt_combine] 0-gv0-disperse-0: Failed to combine iatt (inode: 11735403145588290470-11735403145588290470, links: 1-1, uid: 0-0, gid: 0-0, rdev: 322123661424-571232551144, size: 148176896-148209664, mode: 100644-100644) [2016-01-15 01:01:54.466154] N [ec-generic.c:819:ec_combine_lookup] 0-gv0-disperse-0: Mismatching iatt in answers of 'GF_FOP_LOOKUP' How reproducible: Always. Steps to Reproduce: 1. Build on FreeBSD 10.1-amd64 environment. 2. Create disperse volume with three node/devices. 3. Mount the volume via NFS, write something into it, and then reboot one of nodes. 4. After rebooting the node, access the file. Actual results: "Failed to combine iatt" is logged to nfs.log. Expected results: No errors logged. (and heal succeeds)
Indeed, it makes little sense to set ia_rdev for regular files. The patch looks good to me. Not sure if disperse/ec would want to skip checking ia_rdev as well.
rdev is only checked when the file is a block or a character device. Otherwise it's value is ignored and doesn't cause any mismatch in ec_iatt_combine(). The "Failed to combine iatt" message appears because the file size is different, which is normal after a reboot of one of the nodes. This message (which is a warning, not an error) indicates that self-heal is triggered. Once self-heal finishes, the message will disappear. Based on the bug description, it seems that the only issue is the log message, but apparently there's no problem accessing the file, so I consider this normal behavior. For this reason I'm closing this bug as "not a bug".