projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
196ccc4
)
filesetup: make trim jobs respect --readonly during file open
author
Vincent Fu
<vincent.fu@wdc.com>
Fri, 15 Jun 2018 21:05:28 +0000
(15:05 -0600)
committer
Vincent Fu
<vincent.fu@wdc.com>
Mon, 18 Jun 2018 17:10:26 +0000
(11:10 -0600)
Open files for trim workloads with the O_RDWR access mode only when
the --readonly option is absent.
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 75694bd81825082516d9f1601de08a650ebe9aa1..a2427a1a80bb0bea52aeee2cab761faac09a5cef 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-674,7
+674,8
@@
open_again:
from_hash = file_lookup_open(f, flags);
} else if (td_trim(td)) {
assert(!td_rw(td)); /* should have matched above */
- flags |= O_RDWR;
+ if (!read_only)
+ flags |= O_RDWR;
from_hash = file_lookup_open(f, flags);
}