[Crash-utility] Make 'files -d' return path when dentry.d_inode is null

Dave Anderson anderson at redhat.com
Mon Apr 1 15:59:12 UTC 2019



----- Original Message -----
> [snip]
> 
> > Rather than making a wholesale switch, can you make it check the
> > dentry.d_inode first,
> > and if it's NULL, then check dentry.d_sb?  I'm probably being paranoid, but
> > I'm worried
> > about unintended consequences.
> 
> > Thanks,
> >  Dave
> 
> Sure.  Here's the new version:

Thanks Martin -- queued for crash-7.2.6:

  https://github.com/crash-utility/crash/commit/9166dd323f74b8665a43cd3ad6c4367db4cf49e7

Dave




> 
> (defs.h)
> 2069d2068
> <         long dentry_d_sb;
> 
> (filesys.c)
> 1701c1701
> <               superblock = ULONG(dentry_buf + OFFSET(dentry_d_sb));
> ---
> >               superblock = 0;
> 1704c1704
> <       if (!superblock)
> ---
> >       if (!inode || !superblock)
> 2018d2017
> <         MEMBER_OFFSET_INIT(dentry_d_sb, "dentry", "d_sb");
> 
> Verification:
> 
> Problem dentry, without patch:
> 
>      DENTRY           INODE           SUPERBLK     TYPE PATH
> ffff880328399800                0        0         N/A
> 
> Problem dentry, with patch:
> 
>      DENTRY           INODE           SUPERBLK     TYPE PATH
> ffff880328399800                0 ffff8817daaf6800 N/A
> /u02/oraarch/MRAQ0431/MRAQ0431_1_10357_982129979.arc
> 
> Here's another (intact) dentry both ways:
> 
> Without patch:
> 
>      DENTRY           INODE           SUPERBLK     TYPE PATH
> ffff8817dba87200 ffff880a82d4b940 ffff8817daaf5000 REG
> /u01/app/oracle/product/12.1.0.2.161018/rdbms/mesg/oraus.msb
> 
> With patch:
> 
>      DENTRY           INODE           SUPERBLK     TYPE PATH
> ffff8817dba87200 ffff880a82d4b940 ffff8817daaf5000 REG
> /u01/app/oracle/product/12.1.0.2.161018/rdbms/mesg/oraus.msb
> 
> Regards,
> Martin
> 
> Martin Moore
> Linux/Tru64 RTCC Engineer
> CSC Americas
> HPE Technology Services
> Hewlett Packard Enterprise
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list