Interaction of DIO, CIO, regular opens, and mapped files for NFS
The following behaviors exist between the different access modes that can occur with DIO and CIO.
When existing DIO opens are in effect:
- A regular open causes DIO to be turned off until there are no longer regular opens. When a close reduces the regular opens to 0, DIO is re-enabled if there are still DIO opens outstanding.
- Mapping a file with shmat() or mmap() will deactivate DIO on the file until the number of mappings drops to 0. Then if there are still DIO opens, DIO will be re-enabled.
- Attempts to open the file for CIO will fail with the EINVAL error.
When there are regular opens (no CIO or DIO) in effect:
- DIO open attempts succeed, but DIO is not activated until the count of regular opens drops to 0.
- Opens for CIO will fail with the EINVAL error.
When CIO opens are in effect:
- Regular, DIO, and attempts to map the file will all fail with the EINVAL error.
When CIO|CIOR opens are in effect:
- Regular, DIO, and attempts to map the file will all fail with the EINVAL error except Read-only and CIO|CIOR opens.
Note: When there is a transition to DIO or CIO, client-cached
modifications will first write back to the NFS server prior to deleting
all cached information.