Skip to content

Add support for XFS bigtime (fixes #12)#13

Closed
robbgatica wants to merge 1 commit into
libyal:mainfrom
robbgatica:feature/bigtime-support
Closed

Add support for XFS bigtime (fixes #12)#13
robbgatica wants to merge 1 commit into
libyal:mainfrom
robbgatica:feature/bigtime-support

Conversation

@robbgatica
Copy link
Copy Markdown

Summary

Implements support for the XFS bigtime feature, which extends timestamp range from 2038 to 2486+ using 64-bit nanosecond counters.

Changes

This PR adds bigtime feature detection and timestamp parsing for XFS filesystems:

Modified Files (8 files):

  1. libfsxfs/fsxfs_superblock.h - Added v5 feature fields to on-disk structure
  2. libfsxfs/libfsxfs_superblock.h - Added features_incompat to internal structure
  3. libfsxfs/libfsxfs_superblock.c - Read features_incompat from v5 superblocks
  4. libfsxfs/libfsxfs_io_handle.h - Added features_incompat field
  5. libfsxfs/libfsxfs_volume.c - Copy features_incompat to io_handle
  6. libfsxfs/libfsxfs_definitions.h.in - Added LIBFSXFS_INCOMPAT_FEATURE_FLAG_BIGTIME
  7. libfsxfs/libfsxfs_inode.h - Updated libfsxfs_inode_read_data() signature
  8. libfsxfs/libfsxfs_inode.c - Implemented bigtime detection and conversion

Implementation Details

  • Detects bigtime via features_incompat field (bit 0x08) in v5 superblocks
  • Converts bigtime 64-bit nanosecond counters to Unix epoch nanoseconds
  • Maintains full backward compatibility with legacy XFS filesystems
  • Handles all 4 timestamp types: access, modification, inode_change, creation

Testing

Verified with:

  • Bigtime XFS filesystems (correct 2025 timestamps)
  • Backward compatibility maintained
  • Some basic edge cases: epoch (1970), Y2038 boundary, far future (2100+)
  • Feature combinations: bigtime + reflink + rmapbt
  • Python bindings (pyfsxfs) - timestamps flow correctly to Plaso

Resolves

References

@joachimmetz
Copy link
Copy Markdown
Member

Thanks for the proposed changes I'll take a look at soon at time permits, note that this would require tests and test data as well before this code is ready to be merged

@robbgatica
Copy link
Copy Markdown
Author

No problem at all, I'll keep any eye out for any comments/corrections in the meantime. Thanks!

@joachimmetz
Copy link
Copy Markdown
Member

joachimmetz commented May 23, 2026

Comparable handling of feature flags has been added to ff7bf3e

bigtime conversion 82172f3

@joachimmetz joachimmetz self-assigned this May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add XFS bigtime support add support for bigtime feature

2 participants