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

Add support for "container file systems" #408

Open
rgayon opened this issue Aug 28, 2019 · 4 comments · May be fixed by #659
Open

Add support for "container file systems" #408

rgayon opened this issue Aug 28, 2019 · 4 comments · May be fixed by #659
Assignees
Labels
enhancement file system Issues related to file systems

Comments

@rgayon
Copy link

rgayon commented Aug 28, 2019

Ie: the case of Docker containers

Some pre-work exploring these in docker-explorer

@joachimmetz joachimmetz added enhancement file system Issues related to file systems labels Aug 29, 2019
@sydp
Copy link
Contributor

sydp commented Apr 12, 2022

@rgayon @joachimmetz As discussed oob, i can take a look at this (re-using docker explorer to add support in dfVFS)

@joachimmetz joachimmetz assigned sydp and unassigned rgayon Apr 12, 2022
@sydp
Copy link
Contributor

sydp commented Apr 19, 2022

When a file is "deleted" in a layer of the overlay, the driver sets the character device bit and the device number (st_dev) to 0,0.

"A whiteout is created as a character device with 0/0 device number"
ref: https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html

In the ExtFileEntry class, this bit looks to be masked out:

stat_object.mode = self._fsext_file_entry.file_mode & 0x0fff

In the StatAttribute class, support for the device number is under consideration:

# TODO: consider adding st_dev, st_rdev, st_blksize or st_blocks.

@joachimmetz
Copy link
Member

joachimmetz commented Apr 19, 2022

@sydp you likely want to add it to

_ENTRY_TYPES = {

But you would need to check what the behavior on other file systems is and what functionality we would need

@sydp
Copy link
Contributor

sydp commented Apr 19, 2022

@sydp you likely want to add it to

_ENTRY_TYPES = {

But you would need to check what the behavior on other file systems is and what functionality we would need

Ah great, thanks @joachimmetz.

I'll look into it - currently only have test data for EXT4.

@sydp sydp linked a pull request Apr 22, 2022 that will close this issue
@joachimmetz joachimmetz changed the title Consider supporting "containerized" filesystems Add support for "container file systems" Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement file system Issues related to file systems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants