Use O_NOATIME
This commit is contained in:
parent
33d8e11a3e
commit
18c9936606
|
@ -12,6 +12,12 @@ use IO::Handle;
|
||||||
use Simba::Util qw(quote unquote typestr);
|
use Simba::Util qw(quote unquote typestr);
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
use Config::YAML;
|
use Config::YAML;
|
||||||
|
use Fcntl;
|
||||||
|
|
||||||
|
sub O_NOATIME() {
|
||||||
|
# XXX - possibly specific to Linux x86/amd64
|
||||||
|
return 01000000;
|
||||||
|
}
|
||||||
|
|
||||||
Readonly my $BUFSIZE => 128 * 1024;
|
Readonly my $BUFSIZE => 128 * 1024;
|
||||||
#my $BUFSIZE = 128 * 1024;
|
#my $BUFSIZE = 128 * 1024;
|
||||||
|
@ -179,7 +185,7 @@ sub get {
|
||||||
}
|
}
|
||||||
if (typestr($st->mode) eq 'f') {
|
if (typestr($st->mode) eq 'f') {
|
||||||
my $fh;
|
my $fh;
|
||||||
unless (open($fh, '<:raw', $fn)) {
|
unless (sysopen($fh, $fn, O_RDONLY | O_NOATIME)) {
|
||||||
$fh_out->printflush("fail $path ($!)\n");
|
$fh_out->printflush("fail $path ($!)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue