Uses O_NOATIME if possible.

This commit is contained in:
Andrea Mazzoleni 2012-11-03 23:57:12 +01:00
parent 8f4e5e88a3
commit db6ff47062
6 changed files with 22 additions and 9 deletions

View file

@ -222,7 +222,7 @@ int parity_open(struct snapraid_parity* parity, const char* path)
pathcpy(parity->path, sizeof(parity->path), path);
/* opening in sequential mode in Windows */
parity->f = open(parity->path, O_RDONLY | O_BINARY | O_SEQUENTIAL);
parity->f = open(parity->path, O_RDONLY | O_BINARY | O_SEQUENTIAL | O_NOATIME);
if (parity->f == -1) {
fprintf(stderr, "Error opening parity file '%s'. %s.\n", parity->path, strerror(errno));
return -1;