-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes the following changes 1. Honour O_CLOEXEC in open call 2. FCNTL honour O_CLOEXEC 3. Redirect FREAD_UNLOCKED to FREAD 4. Handle 'pread' calls in SplitFS 5. Intercept fallocate 6. Intercept sync_file_range 7. Add unit tests 8. Add implementation.md
- Loading branch information
Showing
18 changed files
with
748 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Implementation details | ||
Some of the implementation details of intercepted calls in SplitFS | ||
- `fallocate, posix_fallocate` | ||
- We pass this to the kernel. | ||
- But before we pass this on to the kernel we fsync (relink) the file so that the kernel and SplitFS both see the file contents and metadata consistently. | ||
- We also clear the mmap table in SplitFS because they might get stale after the system call. | ||
- We update the file size after the system call accordingly in SplitFS before returning to the application. | ||
- `sync_file_range` | ||
- sync_file_range guarantees data durability only for overwrites on certain filesystems. It does not guarantee metadata durability on any filesystem. | ||
- In case of POSIX mode of SplitFS too, we guarantee data durability and not metadata durability, i.e we want to provide the same guarantees as posix. | ||
- The data durability is guaranteed by virtue of doing non temporal writes to the memory mapped file, so we don't really need to do anything here. In case where the file is not memory mapped (for e.g file size < 16MB) we pass it on to the underlying filesystem. | ||
- In case of Sync and Strict mode in SplitFS, this is guaranteed by the filesystemitself and sync_file_range is not required for durability. | ||
- `O_CLOEXEC` | ||
- This is supported via `open` and `fcntl` in SplitFS. We store this flag value in SplitFS. | ||
- In the supported `exec` calls, we first close the files before passing the `exec` call to the kernel. | ||
- We do not currently handle the failure scenario for `exec` | ||
- `fcntl` | ||
- Currently in SplitFS we only handle value of the `close on exec` flag before it is passed through to the kernel. |
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
Oops, something went wrong.