I use Linux aio ( io_submit()/ io_getevents()) to input / output files. Since some operations do not have equilvalents aio ( open(), fsync(), fallocate()), I use a workflow, which can be blocked without affecting the core flow. My question is should I add close()to this list?
All files are opened using O_DIRECTXFS, but I am interested in both the general answer to the question and the specific answer to my choice of the file system and open mode.
Note that using a workflow for is close()not trivial, as it is close()often called on a cleanup path, which is not a good place to start a workflow request and wait for it. Therefore, I hope it close()does not block in this scenario.
In this question, “lock” means “waiting” for an I / O operation or some kind of lock that can only be released after the I / O operation is completed, but excluding the maintenance of page errors.
source
share