After zfs rollback, XML files have many trailing null (0x00) bytes #17609
Unanswered
anyone2k15
asked this question in
Q&A
Replies: 1 comment 1 reply
-
ZFS rollbacks to exact state of things that was when the snapshot was created. The question to me here is how exactly that file is written so interestingly that it is somehow resized and written in different transactions, creating a window for snapshot to happen i between? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that after performing a zfs rollback on my dataset, some XML files have many trailing null bytes (0x00) appended at the end.
For example, the correct XML file ends cleanly like this (hex dump):
But after rollback, the same file contains many trailing zero bytes:
I suspect this is due to ZFS rollback restoring file blocks but not correctly updating the file size metadata, leaving zero-padding at the end of the file.
Has anyone encountered this issue? What is the recommended way to fix or avoid trailing null bytes in files after a ZFS rollback?
Beta Was this translation helpful? Give feedback.
All reactions