lkml.org 
[lkml]   [2018]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: aio fsync revisited
On Fri, Jan 19, 2018 at 09:46:14AM +1100, Dave Chinner wrote:
> After I get back from LCA (all next week) I'll update the fsmark
> aio patches I have and retest this. The code looks pretty similar to
> the last "generic aio fsync" patch I wrote, so I'm guessing that the
> results will be pretty similar, too.

Your patch applied as-is, as that's what I've been using to test the
feature. Howerever I needed the following fixups to actually make
the compiler and linker happy:

diff --git a/Makefile b/Makefile
index 9b75ce3..ce5f54b 100644
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,14 @@ DIR2= /test/dir2

COBJS= fs_mark.o lib_timing.o
CFLAGS= -O2 -Wall -D_FILE_OFFSET_BITS=64
+LDFLAGS= -laio

all: fs_mark

fs_mark.o: fs_mark.c fs_mark.h

fs_mark: fs_mark.o lib_timing.o
- ${CC} -o fs_mark fs_mark.o lib_timing.o
+ ${CC} ${LDFLAGS} -o fs_mark fs_mark.o lib_timing.o

test: fs_mark
./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096
diff --git a/fs_mark.c b/fs_mark.c
index 8f8fb84..4a4103d 100644
--- a/fs_mark.c
+++ b/fs_mark.c
@@ -135,7 +135,7 @@ get_fsync_completions(int threshold)
aio_flight -= r;
for (i = 0; i < r; ++i) {
if (ioevents[i].res)
- printf("FAIL! aio_fsync returned %d\n",
+ printf("FAIL! aio_fsync returned %zd\n",
ioevents[i].res);
}
usleep(1000);
@@ -162,6 +162,7 @@ do_fsync(int fd)
cleanup_exit();
}

+ return 0;
}

/*
\
 
 \ /
  Last update: 2018-01-19 20:06    [W:0.055 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site