Bug 1299569

Summary: rdev mismatch with FreeBSD UFS filesystem
Product: [Community] GlusterFS Reporter: 2510 <root>
Component: disperseAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: aspandey, bugs, jahernan, pkarampu
Target Milestone: ---Keywords: Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: FreeBSD   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-25 08:44:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Experimental patch none

Description 2510 2016-01-18 16:19:56 UTC
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)

Comment 1 Niels de Vos 2016-01-19 12:15:08 UTC
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.

Comment 2 Xavi Hernandez 2018-10-25 08:44:25 UTC
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".