tyfkda / xv6

64bit port of xv6
Other
6 stars 0 forks source link

File count is limited #3

Open tyfkda opened 6 years ago

tyfkda commented 6 years ago

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

This value is set at creation of fs.img.

takeharukato commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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,