Does XFS support d_type which is a member of linux dirent structure?
Issue
- I'm running readdir() to get the value of d_type which is a member of dirent structure and getdents() syscall returns DT_UNKNOWN on XFS.
12:09:48.041327 getdents(3, {{d_ino=128, d_off=4, d_reclen=24, d_name=".", d_type=DT_UNKNOWN} {d_ino=128, d_off=6, d_reclen=24, d_name="..", d_type=DT_UNKNOWN} {d_ino=131, d_off=8, d_reclen=24, d_name="boot", d_type=DT_UNKNOWN} {d_ino=67108992, d_off=10, d_reclen=24, d_name="dev", d_type=DT_UNKNOWN} {d_ino=134294592, d_off=12, d_reclen=24, d_name="proc", d_type=DT_UNKNOWN} {d_ino=201326720, d_off=14, d_reclen=24, d_name="run", d_type=DT_UNKNOWN} {d_ino=132, d_off=16, d_reclen=24, d_name="sys", d_type=DT_UNKNOWN} {d_ino=67108993, d_off=18, d_reclen=24, d_name="etc", d_type=DT_UNKNOWN} {d_ino=134294593, d_off=20, d_reclen=24, d_name="root", d_type=DT_UNKNOWN} {d_ino=201326721, d_off=22, d_reclen=24, d_name="tmp", d_type=DT_UNKNOWN} {d_ino=133, d_off=28, d_reclen=24, d_name="var", d_type=DT_UNKNOWN} {d_ino=155, d_off=30, d_reclen=24, d_name="usr", d_type=DT_UNKNOWN} {d_ino=175, d_off=32, d_reclen=24, d_name="bin", d_type=DT_UNKNOWN} {d_ino=180, d_off=34, d_reclen=24, d_name="sbin", d_type=DT_UNKNOWN} {d_ino=179, d_off=36, d_reclen=24, d_name="lib", d_type=DT_UNKNOWN} {d_ino=159, d_off=38, d_reclen=32, d_name="lib64", d_type=DT_UNKNOWN} {d_ino=134294609, d_off=40, d_reclen=24, d_name="home", d_type=DT_UNKNOWN} {d_ino=201326740, d_off=42, d_reclen=32, d_name="media", d_type=DT_UNKNOWN} {d_ino=164, d_off=44, d_reclen=24, d_name="mnt", d_type=DT_UNKNOWN} {d_ino=67109049, d_off=46, d_reclen=24, d_name="opt", d_type=DT_UNKNOWN} {d_ino=134294610, d_off=512, d_reclen=24, d_name="srv", d_type=DT_UNKNOWN}}, 32768) = 520 <0.000045>
- Does XFS support d_type which is a member of linux dirent structure?
Environment
- Red Hat Enterprise Linux 7.0
- Red Hat Enterprise Linux 7.1
- Red Hat Enterprise Linux 7.2
- Red Hat Enterprise Linux 7.3
- xfsprogs
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.