Skip to content
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

[DRAFT] Add Overlayfs implementation #659

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Conversation

sydp
Copy link
Contributor

@sydp sydp commented Apr 22, 2022

Fixes #408

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Attention: 60 lines in your changes are missing coverage. Please review.

Comparison is base (c370d92) 88.21% compared to head (917824f) 88.02%.

Files Patch % Lines
dfvfs/vfs/overlay_file_entry.py 77.06% 25 Missing ⚠️
dfvfs/resolver_helpers/overlay_resolver_helper.py 0.00% 13 Missing ⚠️
dfvfs/analyzer/overlay_analyzer_helper.py 0.00% 8 Missing ⚠️
dfvfs/vfs/overlay_directory.py 88.52% 7 Missing ⚠️
dfvfs/vfs/overlay_file_system.py 89.79% 5 Missing ⚠️
dfvfs/file_io/overlay_file_io.py 96.15% 1 Missing ⚠️
dfvfs/path/overlay_path_spec.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #659      +/-   ##
==========================================
- Coverage   88.21%   88.02%   -0.19%     
==========================================
  Files         297      304       +7     
  Lines       12529    12814     +285     
==========================================
+ Hits        11052    11280     +228     
- Misses       1477     1534      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sydp
Copy link
Contributor Author

sydp commented May 20, 2022

Getting errors with pyfsxfs_file_entry_get_extended_attributes.

ERROR: testFileEntryExistsByPathSpec (vfs.overlay_file_system.OverlayFileSystemTestWithXFS)
Test the file entry exists by path specification functionality.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/dfvfs/dfvfs/tests/vfs/overlay_file_system.py", line 191, in testFileEntryExistsByPathSpec
    self.assertFalse(file_system.FileEntryExistsByPathSpec(path_spec))
  File "./dfvfs/vfs/overlay_file_system.py", line 82, in FileEntryExistsByPathSpec
    return self.GetFileEntryByPathSpec(path_spec)
  File "./dfvfs/vfs/overlay_file_system.py", line 106, in GetFileEntryByPathSpec
    for entry in overlay_dir.entries:
  File "./dfvfs/vfs/overlay_directory.py", line 118, in _EntriesGenerator
    yield from self._ReadDirectory(location)
  File "./dfvfs/vfs/overlay_directory.py", line 58, in _ReadDirectory
    for attribute in layer_file_entry.attributes:
  File "./dfvfs/vfs/file_entry.py", line 198, in attributes
    return self._GetAttributes()
  File "./dfvfs/vfs/xfs_file_entry.py", line 87, in _GetAttributes
    self._fsxfs_file_entry.extended_attributes):
OSError: pyfsxfs_file_entry_get_extended_attributes: unable to retrieve number of extended attributes. libcdata_array_get_number_of_entries: invalid array. libfsxfs_inode_get_number_of_attributes_extents: unable to retrieve number of attributes entries. libfsxfs_attributes_get_from_block: unable to retrieve number of attributes extents. libfsxfs_attributes_get_from_inode: unable to retrieve extended attributes from attributes block: 0. libfsxfs_internal_file_entry_get_extended_attributes: unable to retrieve extended attributes from inode. libfsxfs_file_entry_get_number_of_extended_attributes: unable to determine extended attributes.

======================================================================
ERROR: testGetFileEntryByPathSpec (vfs.overlay_file_system.OverlayFileSystemTestWithXFS)
Tests the GetFileEntryByPathSpec function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/dfvfs/dfvfs/tests/vfs/overlay_file_system.py", line 232, in testGetFileEntryByPathSpec
    file_entry = file_system.GetFileEntryByPathSpec(path_spec)
  File "./dfvfs/vfs/overlay_file_system.py", line 106, in GetFileEntryByPathSpec
    for entry in overlay_dir.entries:
  File "./dfvfs/vfs/overlay_directory.py", line 118, in _EntriesGenerator
    yield from self._ReadDirectory(location)
  File "./dfvfs/vfs/overlay_directory.py", line 58, in _ReadDirectory
    for attribute in layer_file_entry.attributes:
  File "./dfvfs/vfs/file_entry.py", line 198, in attributes
    return self._GetAttributes()
  File "./dfvfs/vfs/xfs_file_entry.py", line 87, in _GetAttributes
    self._fsxfs_file_entry.extended_attributes):
OSError: pyfsxfs_file_entry_get_extended_attributes: unable to retrieve number of extended attributes. libcdata_array_get_number_of_entries: invalid array. libfsxfs_inode_get_number_of_attributes_extents: unable to retrieve number of attributes entries. libfsxfs_attributes_get_from_block: unable to retrieve number of attributes extents. libfsxfs_attributes_get_from_inode: unable to retrieve extended attributes from attributes block: 0. libfsxfs_internal_file_entry_get_extended_attributes: unable to retrieve extended attributes from inode. libfsxfs_file_entry_get_number_of_extended_attributes: unable to determine extended attributes.

@joachimmetz
Copy link
Member

I know this PR is still in draft but I recommend to rename overlay.dd to overlay_ext4.dd

@joachimmetz
Copy link
Member

@sydp what is the status of this PR?

@sydp
Copy link
Contributor Author

sydp commented Dec 7, 2023

@sydp what is the status of this PR?

As discussed will get this ready for review.

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 support for "container file systems"
2 participants