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

Rust FS STD interface extension #206

Merged
merged 29 commits into from
Oct 10, 2024

Conversation

CPTforever
Copy link
Contributor

There is a feature and a fix to the filesystem and one to Xtask.

The first is extensible files and a lazy loaded LRU cache. So this will automatically create new objects to write past a single object boundary. I also made the maximum size of each object written to 64 megabytes. The reasoning for this is that Twizzler runs out of memory when I write 1.5 objects. So that's where my cache comes in. I will map and unmap files based on usage so that it can write more than the capacity of the system ram.

I also made a fix to the rust library. Before I just used a simple integer to represent a file descriptor. However this is flawed since a file descriptor can be dropped when moved. So I copied over the RawFd and OwnedFd structs from os/fd.rs since this will manage when the file descriptor is dropped therefore not leaking any memory or dropping the fd prematurely.

Finally I add a slight modification to Xtask so that objects can be moved onto the initrd. There is a folder you can add to src/data and it will rsync this to target//debug directory. This allows more ergonomic testing since now files put into twizzler can be interfaced by the filesystem API.

@CPTforever CPTforever closed this Sep 20, 2024
@CPTforever CPTforever reopened this Sep 20, 2024
@CPTforever
Copy link
Contributor Author

I accidentally closed it while trying to merge changes from Twizzler main to my local main. But since the library changes are in effect, this should play nicer with the rust branch I'm pointing towards now. Though I'm still waiting for my Rust changes to be reviewed so I can point it towards the Rust/Twizzler branch.

Copy link
Contributor

@dbittman dbittman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dbittman dbittman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbittman dbittman merged commit e638ee0 into twizzler-operating-system:main Oct 10, 2024
1 check passed
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.

2 participants