projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Fix disk utilization for md/dm slaves"
[fio.git]
/
engines
/
syslet-rw.c
diff --git
a/engines/syslet-rw.c
b/engines/syslet-rw.c
index ab64054b9c5b7fd39c05067778878436f4db4bc5..c11e4f21fc39990fc6ece7bfd2dc03bee4c682a2 100644
(file)
--- a/
engines/syslet-rw.c
+++ b/
engines/syslet-rw.c
@@
-14,8
+14,7
@@
#include <asm/unistd.h>
#include "../fio.h"
#include <asm/unistd.h>
#include "../fio.h"
-#include "../indirect.h"
-#include "../syslet.h"
+#include "../lib/fls.h"
#ifdef FIO_HAVE_SYSLET
#ifdef FIO_HAVE_SYSLET
@@
-132,6
+131,12
@@
static void fio_syslet_prep_sync(struct fio_file *f,
FILL_IN(*regs, __NR_fsync, (long) f->fd);
}
FILL_IN(*regs, __NR_fsync, (long) f->fd);
}
+static void fio_syslet_prep_datasync(struct fio_file *f,
+ struct indirect_registers *regs)
+{
+ FILL_IN(*regs, __NR_fdatasync, (long) f->fd);
+}
+
static void fio_syslet_prep_rw(struct io_u *io_u, struct fio_file *f,
struct indirect_registers *regs)
{
static void fio_syslet_prep_rw(struct io_u *io_u, struct fio_file *f,
struct indirect_registers *regs)
{
@@
-155,6
+160,8
@@
static void fio_syslet_prep(struct io_u *io_u, struct indirect_registers *regs)
if (io_u->ddir == DDIR_SYNC)
fio_syslet_prep_sync(f, regs);
if (io_u->ddir == DDIR_SYNC)
fio_syslet_prep_sync(f, regs);
+ else if (io_u->ddir == DDIR_DATASYNC)
+ fio_syslet_prep_datasync(f, regs);
else
fio_syslet_prep_rw(io_u, f, regs);
}
else
fio_syslet_prep_rw(io_u, f, regs);
}
@@
-223,7
+230,6
@@
static void fio_syslet_cleanup(struct thread_data *td)
free(sd->events);
free(sd->ring);
free(sd);
free(sd->events);
free(sd->ring);
free(sd);
- td->io_ops->data = NULL;
}
}
}
}
@@
-243,14
+249,8
@@
static int fio_syslet_init(struct thread_data *td)
* The ring needs to be a power-of-2, so round it up if we have to
*/
ring_nr = td->o.iodepth;
* The ring needs to be a power-of-2, so round it up if we have to
*/
ring_nr = td->o.iodepth;
- if (ring_nr & (ring_nr - 1)) {
- int bits = 1;
-
- while (ring_nr >>= 1)
- bits++;
-
- ring_nr = 1 << bits;
- }
+ if (ring_nr & (ring_nr - 1))
+ ring_nr = 1 << __fls(ring_nr);
ring_size = sizeof(struct syslet_ring) +
ring_nr * sizeof(struct syslet_completion);
ring_size = sizeof(struct syslet_ring) +
ring_nr * sizeof(struct syslet_completion);
@@
-292,6
+292,7
@@
static struct ioengine_ops ioengine = {
.cleanup = fio_syslet_cleanup,
.open_file = generic_open_file,
.close_file = generic_close_file,
.cleanup = fio_syslet_cleanup,
.open_file = generic_open_file,
.close_file = generic_close_file,
+ .get_file_size = generic_get_file_size,
};
#else /* FIO_HAVE_SYSLET */
};
#else /* FIO_HAVE_SYSLET */