Skip to content

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

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.

Activity

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

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