projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Always set ->real_file_size to -1 when failed to get file size"
[fio.git]
/
backend.c
diff --git
a/backend.c
b/backend.c
index fc647098d5792e5e4aaf5e366ffcb363e01921ca..1c1f2f9a1e603c084160165eb6596945de344d7a 100644
(file)
--- a/
backend.c
+++ b/
backend.c
@@
-1261,6
+1261,10
@@
static int init_io_u(struct thread_data *td)
return 0;
}
return 0;
}
+/*
+ * This function is Linux specific.
+ * FIO_HAVE_IOSCHED_SWITCH enabled currently means it's Linux.
+ */
static int switch_ioscheduler(struct thread_data *td)
{
#ifdef FIO_HAVE_IOSCHED_SWITCH
static int switch_ioscheduler(struct thread_data *td)
{
#ifdef FIO_HAVE_IOSCHED_SWITCH
@@
-1271,7
+1275,8
@@
static int switch_ioscheduler(struct thread_data *td)
if (td_ioengine_flagged(td, FIO_DISKLESSIO))
return 0;
if (td_ioengine_flagged(td, FIO_DISKLESSIO))
return 0;
- sprintf(tmp, "%s/queue/scheduler", td->sysfs_root);
+ assert(td->files && td->files[0]);
+ sprintf(tmp, "%s/queue/scheduler", td->files[0]->du->sysfs_root);
f = fopen(tmp, "r+");
if (!f) {
f = fopen(tmp, "r+");
if (!f) {
@@
-1359,7
+1364,7
@@
static bool keep_running(struct thread_data *td)
uint64_t diff;
/*
uint64_t diff;
/*
- * If the difference is less than the m
in
imum IO size, we
+ * If the difference is less than the m
ax
imum IO size, we
* are done.
*/
diff = limit - ddir_rw_sum(td->io_bytes);
* are done.
*/
diff = limit - ddir_rw_sum(td->io_bytes);