Skip to content

No more data blocks available error when writing creates ghost blocks #1

@jchenche

Description

@jchenche

In writeToFile(), the function returns 0 after getting a "No more data blocks available" error. This doesn't seem right because it doesn't update the size for the data already written to this file. Therefore, those data won't really belong to this file, creating ghost blocks (allocated but not really used).

This is mainly due to the fact that Read and Delete are based on the file size.

Possible fix is to keep track of number of bytes (size) already written to the file. So when the error occurs, I will break the loop instead of returning 0. This way I won't skip the file size update.

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions