This bug bit me hard on XFS; every file was seen as "not a file" because XFS returns d_type of DT_UNKNOWN instead of DT_REG since XFS doesn't cache the type in a way that readdir() can retrieve "for free." This fix allows for fallback to stat() when d_type returns something dupd can't use and restores normal behavior.
This bug bit me hard on XFS; every file was seen as "not a file" because XFS returns
d_type
ofDT_UNKNOWN
instead ofDT_REG
since XFS doesn't cache the type in a way thatreaddir()
can retrieve "for free." This fix allows for fallback tostat()
whend_type
returns somethingdupd
can't use and restores normal behavior.