Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

File count is limited #3

Open
tyfkda opened this issue Jun 29, 2018 · 3 comments
Open

File count is limited #3

tyfkda opened this issue Jun 29, 2018 · 3 comments
Labels

Comments

@tyfkda
Copy link
Owner

tyfkda commented Jun 29, 2018

Cannot create files or directories more than struct superblock.ninodes.

This value is set at creation of fs.img.

@takeharukato
Copy link

takeharukato commented Aug 13, 2018

Hi,

Sure.
But it is easy to fix.
I've also added this fix into the issue named "Fix some issues #21 ."
P.S. I think xv6 does not use an i-node bitmap on purpose because it does not have asynchronous block I/O layer and it does not have a mechanism to treat anonymous blocks for now.

Thanks,
Regards,

@tyfkda
Copy link
Owner Author

tyfkda commented Aug 14, 2018

Thank you to your commit.
But maybe I am thinking different problem from your solution.

If a user makes many little files or directories and reach the count to superblock.ninodes,
the file system prevent creating new file even if the storage have spaces.
I am wondering is there any way to release the limitation.

@takeharukato
Copy link

Hi

The problem which you pointed is one of crucial and essential problems of traditional UNIX file systems.
To solve this problem, we should allocate blocks for inodes from data blocks (or introduce allocation groups and online resizing functions).

At any case, the file system in xv6 is too trivial, so designing new file systems might be preferable approach to study what modern operating systems do.

You know, I think a fixed size of filesystem might be more important problem at this moment.

Thanks,
Regards,

@tyfkda tyfkda added the fs label Feb 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants