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>2017-08-24 07:02:44 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2017-08-24 07:02:44 +0300
commit9fbb4f05681cdcae03c18a01b802ef2ced8ab8f5 (patch)
treeb8415516d856141ded3c7f1248a6449c509019cb
parentcc0b1c66005331fdf1d60afc9de988586ecf634a (diff)
Make O_CLOEXEC default on for all fds created.
m---------doc/html8
-rw-r--r--include/afio/revision.hpp6
-rw-r--r--include/afio/v2.0/detail/impl/posix/fs_handle.ipp2
-rw-r--r--include/afio/v2.0/detail/impl/posix/import.hpp2
-rw-r--r--include/afio/v2.0/detail/impl/posix/path_handle.ipp2
-rw-r--r--include/afio/v2.0/storage_profile.hpp3
6 files changed, 12 insertions, 11 deletions
diff --git a/doc/html b/doc/html
-Subproject 328d98bda8991b629045bbd2d4853c2cbd92164
+Subproject d1affa0e5a013d665623536aea5b03fdc541f1b
diff --git a/include/afio/revision.hpp b/include/afio/revision.hpp
index a7efe7d9..e52b72d7 100644
--- a/include/afio/revision.hpp
+++ b/include/afio/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 AFIO_PREVIOUS_COMMIT_REF 906cd7a4150518ebcdae081ff091838de539dbd8
-#define AFIO_PREVIOUS_COMMIT_DATE "2017-08-23 03:11:19 +00:00"
-#define AFIO_PREVIOUS_COMMIT_UNIQUE 906cd7a4
+#define AFIO_PREVIOUS_COMMIT_REF cc0b1c66005331fdf1d60afc9de988586ecf634a
+#define AFIO_PREVIOUS_COMMIT_DATE "2017-08-24 03:09:25 +00:00"
+#define AFIO_PREVIOUS_COMMIT_UNIQUE cc0b1c66
diff --git a/include/afio/v2.0/detail/impl/posix/fs_handle.ipp b/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
index e77bb5f8..16ef2e49 100644
--- a/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/fs_handle.ipp
@@ -80,7 +80,7 @@ inline result<path_handle> containing_directory(optional<std::reference_wrapper<
return success(std::move(currentdirh));
// Open the same file name, and compare dev and inode
path_view::c_str zpath(filename);
- int fd = ::openat(currentdirh.native_handle().fd, zpath.buffer, 0);
+ int fd = ::openat(currentdirh.native_handle().fd, zpath.buffer, O_CLOEXEC);
if(fd == -1)
continue;
auto unfd = undoer([fd] { ::close(fd); });
diff --git a/include/afio/v2.0/detail/impl/posix/import.hpp b/include/afio/v2.0/detail/impl/posix/import.hpp
index 939b0914..a4dd435d 100644
--- a/include/afio/v2.0/detail/impl/posix/import.hpp
+++ b/include/afio/v2.0/detail/impl/posix/import.hpp
@@ -38,7 +38,7 @@ AFIO_V2_NAMESPACE_BEGIN
inline result<int> attribs_from_handle_mode_caching_and_flags(native_handle_type &nativeh, handle::mode _mode, handle::creation _creation, handle::caching _caching, handle::flag) noexcept
{
- int attribs = 0;
+ int attribs = O_CLOEXEC;
switch(_mode)
{
case handle::mode::unchanged:
diff --git a/include/afio/v2.0/detail/impl/posix/path_handle.ipp b/include/afio/v2.0/detail/impl/posix/path_handle.ipp
index e16dfd86..877b6c4f 100644
--- a/include/afio/v2.0/detail/impl/posix/path_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/path_handle.ipp
@@ -34,7 +34,7 @@ result<path_handle> path_handle::path(const path_handle &base, path_handle::path
native_handle_type &nativeh = ret.value()._v;
AFIO_LOG_FUNCTION_CALL(&ret);
nativeh.behaviour |= native_handle_type::disposition::directory;
- int attribs = O_RDONLY;
+ int attribs = O_CLOEXEC | O_RDONLY;
#ifdef O_DIRECTORY
attribs |= O_DIRECTORY;
#endif
diff --git a/include/afio/v2.0/storage_profile.hpp b/include/afio/v2.0/storage_profile.hpp
index ef93607c..012422e6 100644
--- a/include/afio/v2.0/storage_profile.hpp
+++ b/include/afio/v2.0/storage_profile.hpp
@@ -320,7 +320,6 @@ namespace storage_profile
"this value is less than max_aligned_atomic_rewrite and some multiple of the CPU cache line size then this is "
"what has happened."};
item<unsigned> read_nothing = {"latency:read:nothing", latency::read_nothing, "The nanoseconds to read zero bytes"};
- item<unsigned> write_nothing = {"latency:write:nothing", latency::write_nothing, "The nanoseconds to write zero bytes"};
item<unsigned long long> read_qd1_min = {"latency:read:qd1:min", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (min)"};
item<unsigned long long> read_qd1_mean = {"latency:read:qd1:mean", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (arithmetic mean)"};
@@ -338,6 +337,8 @@ namespace storage_profile
item<unsigned long long> read_qd16_99 = {"latency:read:qd16:99%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (99% of the time)"};
item<unsigned long long> read_qd16_99999 = {"latency:read:qd16:99.999%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (99.999% of the time)"};
+ item<unsigned> write_nothing = {"latency:write:nothing", latency::write_nothing, "The nanoseconds to write zero bytes"};
+
item<unsigned long long> write_qd1_min = {"latency:write:qd1:min", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (min)"};
item<unsigned long long> write_qd1_mean = {"latency:write:qd1:mean", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (arithmetic mean)"};
item<unsigned long long> write_qd1_max = {"latency:write:qd1:max", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (max)"};