Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-24 15:56:48 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-24 15:56:48 +0300
commit45187b72de40243ed9a55a9a4222f4da0fdf4b15 (patch)
treed5f4492cfab71207530cfc73c0726e1f31133578
parent21883faeb87fa31e209f9ed1de44b3aca89edce2 (diff)
Use syscalls instead of copy_file_range() issue #62.
Add a supported OS kernel statement issue #55.
-rw-r--r--include/llfio/revision.hpp6
-rw-r--r--include/llfio/v2.0/detail/impl/posix/file_handle.ipp21
-rw-r--r--release_notes.md17
3 files changed, 34 insertions, 10 deletions
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp
index b4bbc621..91eeb3c5 100644
--- a/include/llfio/revision.hpp
+++ b/include/llfio/revision.hpp
@@ -1,4 +1,4 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define LLFIO_PREVIOUS_COMMIT_REF 02a501799dbf689063b09f9f557b2057c53022d9
-#define LLFIO_PREVIOUS_COMMIT_DATE "2020-07-10 15:05:00 +00:00"
-#define LLFIO_PREVIOUS_COMMIT_UNIQUE 02a50179
+#define LLFIO_PREVIOUS_COMMIT_REF 21883faeb87fa31e209f9ed1de44b3aca89edce2
+#define LLFIO_PREVIOUS_COMMIT_DATE "2020-07-24 12:31:12 +00:00"
+#define LLFIO_PREVIOUS_COMMIT_UNIQUE 21883fae
diff --git a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
index 59175770..4d431e92 100644
--- a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
@@ -32,6 +32,11 @@ Distributed under the Boost Software License, Version 1.0.
#include <sys/uio.h>
#endif
+#ifdef __linux__
+#include <sys/syscall.h>
+#include <sys/sysmacros.h>
+#endif
+
//#include <iostream>
LLFIO_V2_NAMESPACE_BEGIN
@@ -741,7 +746,21 @@ result<file_handle::extent_pair> file_handle::clone_extents_to(file_handle::exte
#endif
auto _copy_file_range = [&](int infd, off_t *inoffp, int outfd, off_t *outoffp, size_t len, unsigned int flags) -> ssize_t {
#if defined(__linux__)
- return copy_file_range(infd, inoffp, outfd, outoffp, len, flags);
+#if defined __aarch64__
+ return syscall(285 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#elif defined __arm__
+ return syscall(391 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#elif defined __i386__
+ return syscall(377 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#elif defined __powerpc64__
+ return syscall(379 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#elif defined __sparc__
+ return syscall(357 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#elif defined __x86_64__
+ return syscall(326 /*__NR_copy_file_range*/, infd, inoffp, outfd, outoffp, len, flags);
+#else
+#error Unknown Linux platform
+#endif
#elif defined(__FreeBSD__)
// This gets implemented in FreeBSD 13. See https://reviews.freebsd.org/D20584
return syscall(569 /*copy_file_range*/, intfd, inoffp, outfd, outoffp, len, flags);
diff --git a/release_notes.md b/release_notes.md
index 55399f40..9bf7f407 100644
--- a/release_notes.md
+++ b/release_notes.md
@@ -23,7 +23,7 @@ as Intel Optane.
It is a complete rewrite after a Boost peer review in August 2015. Its github
source code repository lives at https://github.com/ned14/llfio.
-- LLFIO is the reference implementation for these C++ standardisation:
+- LLFIO is the reference implementation for these C++ standardisations:
- `llfio::path_view` is expected to enter the C++ 23 standard.
- `llfio::file_handle` and `llfio::mapped_file_handle` are on track for entering the C++ 23 standard.
- Portable to any conforming C++ 14 compiler with a working Filesystem TS in its STL.
@@ -31,6 +31,8 @@ source code repository lives at https://github.com/ned14/llfio.
- Fully clean with C++ 20.
- Will make use of any Coroutines, Concepts, Span, Byte etc if you have them, otherwise swaps in C++ 14 compatible alternatives.
- NOTE that Ubuntu 18.04's libstdc++ 9 does not currently provide symbols for `<codecvt>` if you are building in C++ 20, so linking LLFIO programs on libstdc++ on that Linux if in C++ 20 will fail. Either use a different STL, manually rebuild libstdc++, or use C++ 17.
+- Aims to support Microsoft Windows, Linux, Android, iOS, Mac OS and FreeBSD.
+ - Best effort to support older kernels up to their EOL (as of July 2020: >= Windows 8.1, >= Linux 2.6.32 (RHEL EOL), >= Mac OS 10.13, >= FreeBSD 11).
- Original error code is always preserved, even down to the original NT kernel error code if a NT kernel API was used.
- Optional configuration based on [P1028](https://wg21.link/P1028) *SG14 status_code and standard error object
for P0709 Zero-overhead deterministic exceptions*.
@@ -38,7 +40,7 @@ source code repository lives at https://github.com/ned14/llfio.
- Zero malloc, zero exception throw and zero whole system memory copy design used throughout, even down to paths (which can hit 64Kb!).
- Comprehensive support for virtual and mapped memory of both SCM/DAX and page cached storage, including large, huge and super pages.
-\note This code is of late beta quality. It has been shipping in production with multiple vendors for some years now. It is quite reliable on Windows and Linux (less well tested on Mac OS), so be careful when using it!
+\note Most of this code is of early mature quality. It has been shipping in production with multiple vendors for some years now, indeed amongst many big data solutions it powers the low level custom database component of the US Security and Exchange Commission's MIDAS solution which ingresses Terabytes of trade data per day. It is quite reliable on Windows and Linux (less well tested on Mac OS), so be careful when using it!
Examples of use:
<table width="100%" border="0" cellpadding="4">
@@ -129,25 +131,28 @@ Todo:
| ✔ | ✔ | ✔ | `llfio::algorithm::trivial_vector<T>` with constant time reallocation if `T` is trivially copyable.
| | ✔ | ✔ | `symlink_handle`.
| ✔ | ✔ | ✔ | Large, huge and massive page size support for memory allocation and (POSIX only) file maps.
+| ✔ | ✔ | ✔ | A mechanism for writing a `stat_t` onto an inode.
+| ✔ | ✔ | ✔ | Graph based directory hierarchy traveral algorithm.
+| ✔ | ✔ | ✔ | Graph based directory hierarchy summary algorithm.
+| ✔ | ✔ | ✔ | Graph based reliable directory hierarchy deletion algorithm.
+| ✔ | ✔ | ✔ | Intelligent file contents cloning between file handles.
Todo thereafter in order of priority:
| NEW in v2 | Windows | POSIX | |
| --------- | --------| ----- | --- |
-| ✔ | | | A mechanism for writing a `stat_t` onto an inode.
| ✔ | | | Page allocator based on an index of linked list of free pages. See notes.
| ✔ | | | Optionally concurrent B+ tree index based on page allocator for key-value store.
| ✔ | | | Attributes extending `span<buffers_type>` with DMA colouring.
| ✔ | | | Coroutine generator for iterating a file's contents in DMA friendly way.
-| ✔ | | | Ranges & Concurrency based reliable directory hierarchy deletion algorithm.
| ✔ | | | Ranges & Concurrency based reliable directory hierarchy copy algorithm.
| ✔ | | | Ranges & Concurrency based reliable directory hierarchy update (two and three way) algorithm.
-| ✔ | | | Linux KAIO support for native non-blocking `O_DIRECT` i/o
+| ✔ | | | Linux io_uring support for native non-blocking `O_DIRECT` i/o
| ✔ | | | `std::pmr::memory_resource` adapting a file backing if on C++ 17.
| ✔ | | | Extended attributes support.
| ✔ | | | Algorithm to replace all duplicate content with hard links.
| ✔ | | | Algorithm to figure out all paths for a hard linked inode.
-| ✔ | | | Algorithm to compare two or three directory enumerations and give differences. Probably blocked on the Ranges TS.
+| ✔ | | | Algorithm to compare two or three directory enumerations and give differences.
Features possibly to be added after a Boost peer review:
- Directory change monitoring.