From 18c9936606d21f98664cf9b219f0c97958d19ec5 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 5 Mar 2018 19:33:19 +0000 Subject: [PATCH] Use O_NOATIME --- lib/Simba/DA.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Simba/DA.pm b/lib/Simba/DA.pm index a390b7e..f608258 100644 --- a/lib/Simba/DA.pm +++ b/lib/Simba/DA.pm @@ -12,6 +12,12 @@ use IO::Handle; use Simba::Util qw(quote unquote typestr); use POSIX qw(strftime); use Config::YAML; +use Fcntl; + +sub O_NOATIME() { + # XXX - possibly specific to Linux x86/amd64 + return 01000000; +} Readonly my $BUFSIZE => 128 * 1024; #my $BUFSIZE = 128 * 1024; @@ -179,7 +185,7 @@ sub get { } if (typestr($st->mode) eq 'f') { my $fh; - unless (open($fh, '<:raw', $fn)) { + unless (sysopen($fh, $fn, O_RDONLY | O_NOATIME)) { $fh_out->printflush("fail $path ($!)\n"); return; }