GSoC 2020 Project Update(UFS2): First Evaluation | Haiku Project

Hello Everyone!

This is my second post related to my project, Adding UFS2 file system in Haiku


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/suhelmehta/2020-07-10_gsoc_2020_project_updateufs2_first_evaluation/
3 Likes

It’s good that you are learning, and better that you are being useful and also enjoying yourself. Keep it up!

1 Like

Congratulations! And thank you for your collaboration to the project.

Thank you for your encouragement! I will do my best :slight_smile:

1 Like

It’s my pleasure to work with all of you :slight_smile:

1 Like

If I understand the problem of 4-char-granularity correctly, then the following formula may be applied:

int granular_length(int initial_length, int granularity)
{
  return (initial_length + granularity - 1) / granularity * granularity;
}

So:
granular_length(0, 4) = 0,
granular_length(1, 4) = 4,
granular_length(2, 4) = 4,
granular_length(3, 4) = 4,
granular_length(4, 4) = 4,
granular_length(5, 4) = 8,
and so on.

1 Like