From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>,
viro@zeniv.linux.org.uk, Avi Kivity <avi@scylladb.com>,
linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: aio fsync revisited
Date: Fri, 19 Jan 2018 20:06:09 +0100 [thread overview]
Message-ID: <20180119190609.GA19772@lst.de> (raw)
In-Reply-To: <20180118224614.GI16421@dastard>
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;
}
/*
prev parent reply other threads:[~2018-01-19 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 19:47 aio fsync revisited Christoph Hellwig
2018-01-17 19:47 ` Christoph Hellwig
2018-01-17 19:47 ` [PATCH] aio: resurrect IOCB_CMD_FSYNC and IOCB_CMD_FDSYNC support Christoph Hellwig
2018-01-18 22:46 ` aio fsync revisited Dave Chinner
2018-01-19 19:06 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180119190609.GA19772@lst.de \
--to=hch@lst.de \
--cc=avi@scylladb.com \
--cc=david@fromorbit.com \
--cc=linux-aio@kvack.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.