projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Make ->buflen == 0 on SYNC io_u's
[fio.git]
/
engines
/
fio-engine-sync.c
diff --git
a/engines/fio-engine-sync.c
b/engines/fio-engine-sync.c
index 8bc990d72bcd3de7457169e9b27b1f1389719bd9..43f42ca2ffcace7068656a0ebd4453453af69d7b 100644
(file)
--- a/
engines/fio-engine-sync.c
+++ b/
engines/fio-engine-sync.c
@@
-57,7
+57,7
@@
static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u)
{
struct syncio_data *sd = td->io_ops->data;
struct fio_file *f = io_u->file;
{
struct syncio_data *sd = td->io_ops->data;
struct fio_file *f = io_u->file;
- int ret;
+
unsigned
int ret;
if (io_u->ddir == DDIR_READ)
ret = read(f->fd, io_u->buf, io_u->buflen);
if (io_u->ddir == DDIR_READ)
ret = read(f->fd, io_u->buf, io_u->buflen);
@@
-66,7
+66,7
@@
static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u)
else
ret = fsync(f->fd);
else
ret = fsync(f->fd);
- if (
(unsigned int)
ret != io_u->buflen) {
+ if (ret != io_u->buflen) {
if (ret > 0) {
io_u->resid = io_u->buflen - ret;
io_u->error = EIO;
if (ret > 0) {
io_u->resid = io_u->buflen - ret;
io_u->error = EIO;