Trying to understand how aio(4), mount(8) async (and gjournal)
relate
Jan Mikkelsen
janm at transactionware.com
Tue Mar 24 17:42:28 PDT 2009
Hi,
[Jumping into a conversation on aio, async mounts, etc.]
I have had a few questions for a while that I haven't asked yet; these
seems like an appropriate time to ask them!
Is it reasonable to open a file with O_FSYNC and then use aio_write() to
issue multiple writes, and then assume that the data is on disk when the
aio completes?
Can I get I/O parallelism using this approach? I recall reading (some
time ago) that FreeBSD doesn't do I/O parallelism on a single file
descriptor. Is that true? Do I need to open the file multiple times in
order to get I/O parallelism?
You can see where I'm going with this: What I'd really like to do is
open a file with O_FSYNC | O_DIRECT | O_EXCL, and then do lots of aio
operations on it using chunks that a multiple of the page size with
buffers that are aligned on page boundaries. I'd like to know when aio
writes are "really" complete to maintain various kinds of on-disk
structures (eg. b-trees). I'd also like to avoid call fsync(2).
Thanks,
Jan Mikkelsen
More information about the freebsd-fs
mailing list