This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address feedback and fix issues around tracking file size
Add `sizeValid` to track whether we need to call `plugin.Size` before using `size`. This is only needed when opening a file WriteOnly to delay a Read - to ensure we have the entire file content before Write - so we only do it when necessary. Handle `io.EOF` when loading the file in case a call to `Setattr` increased it beyond the original size but didn't write to fill that space, and pad with null characters when that happens. Upgrade journal entries to warnings when they result in an error. FUSE doesn't relay the actual error messages. Delay releasing data and clearing entry cache until we release all writers. Tweak a few tests so we have a balance of ReadWrite tests that rely on attribute size or calling Read to determine size. Update TestTruncateAndWrite to ensure we don't call Read when we've called Setattr to truncate the file first. Add additional comments explaining how to use BlockReadable and Writable, and some code comments to clarify how Open works. Signed-off-by: Michael Smith <[email protected]>
- Loading branch information
1 parent
33e8f02
commit 780630d
Showing
3 changed files
with
149 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters