-
Notifications
You must be signed in to change notification settings - Fork 635
Xfs support #1476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xfs support #1476
Conversation
Implemented: blkstat, blkls, blkcat, istat, ils, icat, fls, fsstat. Unsupported XFS features (yet): very large inodes (XFS_DINODE_FMT_BTREE), real-time devices, journaling log
Implemented: blkstat, blkls, blkcat, istat, ils, icat, fls, fsstat. Unsupported XFS features (yet): very large inodes (XFS_DINODE_FMT_BTREE), real-time devices, journaling log
- Fixed a few int overflows - Adjusted addressing scheme for cases of AG size not being power of 2 - Added proper last block and last inode calculationwq
- Now parsing all XFS_DINODE_FMT_EXTENTS forms of directories properly ("block directories", "leaf directories", "node directories"). Would benefit from refactoring
- Finished XFS_DINODE_FMT_BTREE directory blocks parsing - A bit of refactoring
I realize now there is another pull request, where we work on the same filesystem independently (#1461). I look forward to collaborate, looks like I haven't tested tsk_recover functionality, but large directories and timelining work in my case. |
006ab56
to
5828454
Compare
…igned to a maximum number of records, not actual number of records
…nnum and its bitmask)
I've tested the code and find it quite usable for XFS analysis. I've ran into one problem however (related to handling of unused data in directory records, when the offset is wrongly computed). The following patch fixes the behavior:
|
Filetypes
…-> xfs fsblock address conversion
… and with header padding
Added and tested support for V5 (RHEL), real-time devices (some nuances here), and file attributes |
I've noted two issues where istat seems to not display blocks correctly.
The issue here seems to be that the file is so fragmented, the extents are being stored as a B-Tree. Here's the relevant output from xfs_db:
xfs_db disagrees:
I've done the math and what istat is displaying are not physical block offsets either. I have no idea what those numbers are. Is it just that istat is having trouble dealing with fragmentation in general? |
blkls fails to gather all of unallocated:
The size of the output file should equal the amount available as reported by the df command. The blockls output is only slightly over half of the available space in the file system. |
This one is more a feature request. It would be great if fls could parse and display deleted directory entries where possible. |
from my quite limited experience with hacking the XFS support, I'd say that the particular dataset where you're observing the issues would help identify the problem in the code. Any chance you could share the image? |
I wish I could. Unfortunately it's customer data in a current investigation. The system is SLES 12.3. The issues I'm finding seem to be with fragmented files, but that could just be coincidence. |
@halpomeranz thank you for a thorough review. Is there any chance you can send at least some verbose output -v from istat / blkls along with fsstat info? |
Also, how his this different from #1461? |
Hi. I'm sorry for the delay in getting to this. If you can give us a test image and a test case and rebuase this to be the current develop release, I can accept it. |
Closing as we went with #1461. |
Implemented and tested: blkstat, blkls, blkcat, istat, ils, icat, fls, fsstat.
Tested on 6 images created from CentOS, including one with ~111000 files and nested directories to test multilevel B+trees and various XFS corner cases (large btree inodes and directory blocks).
It is in a good shape to build timeline with mactime/fls from a raw image during investigations.
Unsupported XFS features (yet): real-time devices, file attributes parsing.