Context
This issue applies to flan development, specifically on the jag/flan-overwrite branch.
This issue was originally described with this message from the Discord server. The issue specific to the number of bytes was discovered with this message. Additionally the original overwrite issue was shown to exist with this GitHub Gist.
Demo
Running the flan_test_overwrite test from jag/flan-overwrite twice with a fresh mkfs.flexalloced loopback device produces the following behaviour:
$ sudo FLAN_TEST_DEV=/dev/loop1 ./build/flan/flan_test_overwrite 4096
Before object write, read data (16 bytes):
After object write, read data (28 bytes): My favourite food is salad!
Closing, re-opening
Before object write, read data (28 bytes): My favourite food is salad!
After object write, read data (28 bytes): My favourite food is pizza!
Closing, re-opening
Before object write, read data (28 bytes): My favourite food is pizza!
After object write, read data (32 bytes): My favourite food is chocolate!
$ sudo FLAN_TEST_DEV=/dev/loop1 ./build/flan/flan_test_overwrite 4096
Before object write, read data (28 bytes): My favourite food is chocola
After object write, read data (28 bytes): My favourite food is salad!
Closing, re-opening
Before object write, read data (28 bytes): My favourite food is salad!
After object write, read data (28 bytes): My favourite food is pizza!
Closing, re-opening
Before object write, read data (28 bytes): My favourite food is pizza!
After object write, read data (32 bytes): My favourite food is chocolate!
On the second run, the initial print shows that the object has 28 bytes of data. However, it should have 32 as shown by the end of the first run. The actual data in the object seems to have been persisted, so it's only the number of bytes that seem to be the problem now.
Context
This issue applies to flan development, specifically on the
jag/flan-overwritebranch.This issue was originally described with this message from the Discord server. The issue specific to the number of bytes was discovered with this message. Additionally the original overwrite issue was shown to exist with this GitHub Gist.
Demo
Running the
flan_test_overwritetest fromjag/flan-overwritetwice with a freshmkfs.flexalloced loopback device produces the following behaviour:On the second run, the initial print shows that the object has 28 bytes of data. However, it should have 32 as shown by the end of the first run. The actual data in the object seems to have been persisted, so it's only the number of bytes that seem to be the problem now.