mirror of
https://github.com/restic/restic.git
synced 2026-11-05 14:59:21 +00:00
Set O_NOATIME flag on Linux
Citing Kerrisk, The Linux Programming Interface:
The O_NOATIME flag is intended for use by indexing and backup
programs. Its use can significantly reduce the amount of disk
activity, because repeated disk seeks back and forth across the
disk are not required to read the contents of a file and to update
the last access time in the file’s i-node[.]
restic used to do this, but the functionality was removed along with the
fadvise call in #670.
This commit is contained in:
1 parent
2c3e5d943d
commit
7080fed7ae
4 files changed
+112
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package fs
|
||||
|
||||
import "os"
|
||||
|
||||
// OS-specific replacements of setFlags can set file status flags
|
||||
// that improve I/O performance.
|
||||
func setFlags(*os.File) error {
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user