xfs_readdir will call dir_emit. which receives type as parameter. it will always return DT_UNKNOWN.
Emitting DT_UNKOWN is expeceted behaviour if the filesystem does provide dirent type information to readdir. XFS filesystems that do not have the "mkfs.xfs -n ftype=1" parameter set will behave this way (have for 15 years). "ftype=1" is the default in recent xfsprogs releases so new filesystems will return types other than DT_UNKNOWN, but old/existing filesytsem without this parameter set will always return DT_UNKNOWN. Not a bug, nothing needs fixing, please close.
thanks dave. you save the day.