diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-05-19 12:13:11 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-05-19 12:13:11 -0400 |
commit | 88801726ccdca50d65808d8201681e033052f6d4 (patch) | |
tree | b9987f186ef5892971cb0b43b168fd3b0ba9d632 /src/docs | |
parent | 850bfde29375f3efb205defd8d08fef85b60e57b (diff) | |
download | mongo-88801726ccdca50d65808d8201681e033052f6d4.tar.gz |
WT-2637: The file-extension documentation doesn't cover not-supported cases (#2733)
* WT-2637: The file-extension documentation doesn't cover not-supported cases
Clarify not-supported cases in the file-extension documentation.
Public domain the POSIX file system implementation, it's a natural
starting point for anyone writing their own implementation.
* Fix a typo, add some wording around when methods can be changed after
hnadle creation.
* Add a pointer to ex_file_system.c, the principle custom file system
example.
Diffstat (limited to 'src/docs')
-rw-r--r-- | src/docs/custom-file-systems.dox | 29 | ||||
-rw-r--r-- | src/docs/spell.ok | 3 |
2 files changed, 23 insertions, 9 deletions
diff --git a/src/docs/custom-file-systems.dox b/src/docs/custom-file-systems.dox index 4b012952e15..cddec0e4258 100644 --- a/src/docs/custom-file-systems.dox +++ b/src/docs/custom-file-systems.dox @@ -5,21 +5,34 @@ used by WiredTiger to interact with the I/O subsystem using the WT_FILE_SYSTEM and WT_FILE_HANDLE interfaces. It is not necessary for all file system providers to implement all methods -in the WT_FILE_SYSTEM and WT_FILE_HANDLE structures. The documentation for +in the WT_FILE_SYSTEM and WT_FILE_HANDLE structures, and documentation for those structures indicate which methods are optional. Methods which are not -provided should be set to NULL. Generally the function pointers should not -be changed once a handle is created. There is one exception to this, which -are the fallocate and fallocate_nolock - for an example of how fallocate -can be changed after create see the WiredTiger POSIX file system -implementation. +provided should be set to NULL. + +Generally, function pointers should not be changed once a handle is +created. An exception to this are the WT_FILE_HANDLE::fallocate and +WT_FILE_HANDLE::fallocate_nolock methods, because a file system +implementation may not know what support the system provides until file +allocation is attempted. See the WiredTiger POSIX file system +implementation for an example of how the fallocate method might be +changed after initialization. WT_FILE_SYSTEM and WT_FILE_HANDLE methods which fail but not fatally -(for example, a file truncation call which fails because the file is -currently mapped into memory), should return EBUSY. +(for example, a WT_FILE_HANDLE::truncate method call which fails because +the file is currently mapped into memory), should return EBUSY. + +WT_FILE_SYSTEM and WT_FILE_HANDLE methods which fail fatally, but not +in all cases (for example, a WT_FILE_HANDLE::fadvise method call which +only supports ::WT_FILE_HANDLE_WILLNEED), should return ENOTSUP. Unless explicitly stated otherwise, WiredTiger may invoke methods on the WT_FILE_SYSTEM and WT_FILE_HANDLE interfaces from multiple threads concurrently. It is the responsibility of the implementation to protect any shared data. +See @ex_ref{ex_file_system.c} for an example implementation of a custom +file system; the WiredTiger code for a POSIX standard file system is in +the public domain and may also be useful as a starting point for a custom +file system implementation. + */ diff --git a/src/docs/spell.ok b/src/docs/spell.ok index d197b5517f2..96fe04d7426 100644 --- a/src/docs/spell.ok +++ b/src/docs/spell.ok @@ -81,6 +81,7 @@ Seward's SiH TXT URIs +WILLNEED WiredTiger WiredTiger's WiredTigerCheckpoint @@ -210,8 +211,8 @@ erlang errno exe fadvise -fallocate failchk +fallocate fd's fdatasync fieldname |