Bug 109001 - xfs_readdir reports differ file type of xfs_vn_getattr in v2 dirs
Summary: xfs_readdir reports differ file type of xfs_vn_getattr in v2 dirs
Status: RESOLVED INVALID
Alias: None
Product: File System
Classification: Unclassified
Component: XFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: XFS Guru
URL:
Keywords:
Depends on:
Blocks: 108811
  Show dependency tree
 
Reported: 2015-12-07 13:57 UTC by LiLinZhe
Modified: 2015-12-08 00:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.3.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description LiLinZhe 2015-12-07 13:57:19 UTC
xfs_readdir will call  dir_emit. which receives type as parameter. it will always return DT_UNKNOWN.
Comment 1 Dave Chinner 2015-12-07 20:55:34 UTC
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.
Comment 2 LiLinZhe 2015-12-08 00:49:31 UTC
thanks dave. you save the day.

Note You need to log in before you can comment on or make changes to this bug.