Skip to content

Commit 2c4f1c9

Browse files
authored
Merge pull request #19 from OmSaran/pass
Changes to pass all posix PJD tests
2 parents 878b6c1 + 579a903 commit 2c4f1c9

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,7 @@ SplitFS is under active development.
101101
2. The current implementation of SplitFS works correctly for the following applictions: `LevelDB running YCSB, SQLite running TPCC, tar, git, rsync`. This limitation is purely due to the state of the implementation, and we aim to increase the coverage of applications by supporting more system calls in the future.
102102

103103
## Testing
104-
[PJD POSIX Test Suite](https://www.tuxera.com/community/posix-test-suite/) that tests primarily the metadata operations was run on SplitFS and yielded the following result.
105-
Tests Passed: 1944 out of a total of 1957.
106-
Tests that failed include:
107-
1. Tests on `link` (tests 56-58, 63-65 in links/00.t)
108-
2. Tests on `rename` (tests 49, 53, 57, 61 in rename/00.t)
109-
3. Tests on `unlink` (tests 17, 22, 53 in in unlink/00.t)
110-
111-
We aim to to improve this to a 100% pass rate soon.
104+
[PJD POSIX Test Suite](https://www.tuxera.com/community/posix-test-suite/) that tests primarily the metadata operations was run on SplitFS successfully.
112105

113106
**Running the Test Suite**
114107
Before running the tests, make sure you have [set-up ext4-DAX](#set-up-ext4-DAX)
@@ -125,6 +118,13 @@ where `<mode>` is one of `posix`, `sync` or `strict`. Example: `make -C tests p
125118

126119
Tip: Redirect stderr for less verbose output: e.g `make test 2>/dev/null`
127120

121+
## Implementation Notes
122+
1. Only regular files, block special files and directories (only for consistency guarantees) are handled by SplitFS, the other file types are delegated to POSIX.
123+
2. Only files in the persistent memory mount are handled by SplitFS, rest are delegated to POSIX.
124+
Currently this is only done by examination of absolute paths specified, we aim to have this check for relative paths too, soon.
125+
3. Currently, the persistent memory mount is assumed to be at `/mnt/pmem_emul/`.
126+
We aim to have this controlled via a runtime environment variable soon.
127+
128128
## License
129129

130130
Copyright for SplitFS is held by the University of Texas at Austin. Please contact us if you would like to obtain a license to use SplitFS in your commercial product.

splitfs/fileops_hub.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,22 @@ RETT_OPEN _hub_OPEN(INTF_OPEN)
639639

640640
#endif
641641

642-
#if WORKLOAD_TAR | WORKLOAD_GIT | WORKLOAD_RSYNC
643-
644-
if(path[0] == '/' && path[1] == 'v' && path[2] == 'a' && path[3] == 'r') {
645-
op_to_use = _hub_fileops;
646-
goto opening;
642+
/* In case of absoulate path specified, check if it belongs to the persistent memory
643+
* mount and only then use SplitFS, else redirect to POSIX
644+
*/
645+
if(path[0] == '/') {
646+
int len = strlen(NVMM_PATH);
647+
char dest[len + 1];
648+
dest[len] = '\0';
649+
strncpy(dest, path, len);
650+
651+
if(strcmp(dest, NVMM_PATH) != 0) {
652+
op_to_use = _hub_fileops;
653+
goto opening;
654+
}
647655
}
648656

657+
649658
/*
650659
if (!strcmp(path, "/dev/shm/exec-ledger") || !strcmp(path, "/dev/shm/exec-hub")) {
651660
op_to_use = _hub_fileops;
@@ -692,7 +701,6 @@ RETT_OPEN _hub_OPEN(INTF_OPEN)
692701

693702
}
694703

695-
#endif // WORKLOAD_TAR
696704

697705
// op_to_use = _hub_managed_fileops;
698706
assert(op_to_use != NULL);

0 commit comments

Comments
 (0)