比如dentry的地址是ffff888140f49710,输出文件路径的方法是:
- 使用files命令
crash> files -d 0xffff888140f49710
DENTRY INODE SUPERBLK TYPE PATH
ffff888140f49710 ffff888140fb2b88 ffff8881c0daf000 REG /var/log/journal/a93e80bc64d54c6187b90bc46e84d7a8/system.journal
- 使用list命令
dentry结构通过d_parent指向父dentry,而dentry的名字存放在d_name中,所以可以得出:
crash> list -o dentry.d_parent -s dentry.d_name.name ffff888140f49710
ffff888140f49710
d_name.name = 0xffff888140f49788 "system.journal"
ffff888140f495c8
d_name.name = 0xffff888140f11090 "a93e80bc64d54c6187b90bc46e84d7a8"
ffff888140f490a8
d_name.name = 0xffff888140f49120 "journal"
ffff888140f48f60
d_name.name = 0xffff888140f48fd8 "log"
ffff888140f4ce18
d_name.name = 0xffff888140f4ce90 "var"
ffff8881c487a520
d_name.name = 0xffff8881c487a598 "/"
标签:ffff888140f49710,crash,name,dentry,journal,路径,list
From: https://www.cnblogs.com/pengdonglin137/p/17779545.html