Trying to understand how aio(4), mount(8) async (and gjournal) relate

Julian Elischer julian at elischer.org
Mon Mar 23 10:30:31 PDT 2009


Mel Flynn wrote:
> Hello list,
> 
> in an effort to try and understand the various async systems available, it's 
> unclear to me how (if at all) the above relate.
> 
> If one mounts a disk with async, does this internally use aio system calls, or 
> is there a subsystem available which does largely the same? If so, why are 
> there 2 subsystems?


the async mount operation tells the systewm that writes done by a 
process may be actually written to teh filesystem at any time later, 
and that it is ok to return "success" to the user immediately, 
regardless of whether the write has actually been done.
This also applies to the metadata. It does not affect reads at all.

> 
> When using aio, for example with squid, does this mean the underlying provider 
> needs to be mounted async or is this totally unrelated? Similarly if said disk 
> is on a gjournalled partition, is the async mount redundant or is using aio 
> redundant or neither?
> 

no the aio system calls are implemented in a manner that allows
the caller to request IO and then return at a later time to find out
the result. it has no connection to the mount option.


BTW for efficient async IO check out the relationship between the aio 
calls and the kqueue calls.

> The systems themselves are properly documented - I just couldn't find any info 
> on how they relate, or why they are unrelated.



More information about the freebsd-fs mailing list