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

Generate directory trees #12

Open
Minoru opened this issue Nov 3, 2020 · 0 comments
Open

Generate directory trees #12

Minoru opened this issue Nov 3, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Minoru
Copy link
Owner

Minoru commented Nov 3, 2020

Right now, PlentyFS contains just one directory with a fixed number of files. Ideally, it should generate a random hierarchy instead.

This is trickier than generating random files because:

  1. all the filesystem entries have to have unique inode numbers assigned to them;
  2. there is a global limit on the amount of data in the whole filesystem (Add mount option for filesystem size #9) and each file (Add mount option for maximum file size #10). The limits are statistical, i.e. PlentyFS is allowed to deviate from them, but it should strive to meet them;
  3. there is a global limit of how many entries each directory can have (Add mount option for maximum number of entries per directory #11).

This makes directories inter-dependent, and thus much harder to generate piecemeal. I've no idea how to do this yet.

Generating the whole hierarchy at once and holding it in memory might be an acceptable first approximation, but it won't work if we want billions of files (1 billion 64-bit inodes = 7.5 gigabytes of data, but we also need meta-data of what inodes are directories containing which file inodes).

@Minoru Minoru added the enhancement New feature or request label Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant