inn.qnx.com <lew@perftech.com> wrote:
Is there a detailed description of the various “commit” levels (none, low,
medium, high) for io-blk.so and the underlying filesystems, particularly
qnx4? The on-line documentation explains that “none” means “everything
async” and “high” means that all writes are synchronous, but there isn’t a
lot of other information, such as the real differences between none, low,
There are 4 write types: sync (start immediately and wait for completion),
async (start immediately but do not wait for completion), delayed (do not
start until after a timeout period and then perform as async), and a
only-if-you-have-to form. The “blk delwri=” option controls the timeout
for the delayed format.
There are 3 types of data: user (what you read()/write()), metadata
(things associated with stat() like times and ids), and filesystem
data (things like bitmaps, extents, etc).
If a file has no links then that last form is used, never going to disk
unless buffer/cache is needed (since the file has no links the data is
not expected to be accessable after a power-loss). If a file was
opened O_SYNC then the sync format is always used.
Otherwise the “blk commit=” level controls the type of write to use
for each level of data. If “none” then everything is delayed, if “high”
then everything is sync. The “low” and “medium” are very similar
except for metadata type, which is either async or sync respectively.
and medium, as well as how that applies to file operations like fsync()
and close().
close() may force a metadata update but does nothing to user data.
fsync() will always force out any delayed-write blocks for the file
(and so is only useful when commit != high).