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

Files bigger than 16MBs not yet supported #71

Open
freezing opened this issue Feb 2, 2016 · 5 comments
Open

Files bigger than 16MBs not yet supported #71

freezing opened this issue Feb 2, 2016 · 5 comments

Comments

@freezing
Copy link

freezing commented Feb 2, 2016

Although the exception says:
java.lang.AssertionError: files bigger than 16GB not yet supported;
According to my tests, files bigger than 16MB are not supported.

According to the following lines:
https://github.com/marschall/memoryfilesystem/blob/master/src/main/java/com/github/marschall/memoryfilesystem/MemoryInode.java#L32
https://github.com/marschall/memoryfilesystem/blob/master/src/main/java/com/github/marschall/memoryfilesystem/MemoryInode.java#L356

IndirectBlocks is a matrix of size BLOCK_SIZE * BLOCK_SIZE which is 4k * 4k = 16MB.

Also, I think there should be two constants, NUMBER_OF_BLOCKS * BLOCK_SIZE. It's more readable.

Can it be changed to support a file of size at least a couple of Gigs?
The exception message should be changed as well:
https://github.com/marschall/memoryfilesystem/blob/master/src/main/java/com/github/marschall/memoryfilesystem/MemoryInode.java#L360

marschall added a commit that referenced this issue Feb 3, 2016
Address some issues raised in #71
@marschall
Copy link
Owner

Regarding the additional constant and exception message, these are good points and I fixed them in d6f915a.

Now for the maximum file size how big do you really need? Remember this will all be heap memory. The quick fix is to simply up the limits but this will cause really large objects in the heap. The proper solution would be to implement double indirect addressing.

@freezing
Copy link
Author

freezing commented Feb 3, 2016

Thanks.

I think 1GB should be more than enough at the moment. I understand that it will be heap memory, but for now the quick fix will work just fine.

For 1GB it should take 300k of blocks to be initialized. Each of them will be empty unless something is written to the file. It should be fine since not all of the files will be that large.

@develar
Copy link

develar commented Jul 25, 2020

Any news?

@marschall
Copy link
Owner

@develar no new so far, is this a deal breaker for you?

@develar
Copy link

develar commented Jul 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants