If the user address space or task terminates while actually running
in the PFS code for a PFS interface operation, or if the PFS code
itself fails, an MVS™ abnormal
end is generated for each affected task. The MVS system then usually runs the FRR and ESTAE
recovery exits.
- If the PFS does not have recovery established, the vn_recovery
operation is available to allow the PFS to run its recovery processing
as an exit from the LFS's ESTAE. See the description of vn_recovery
and vfs_recovery that follows this list.
- If the PFS needs its own special recovery, it must establish an
FRR or ESTAE on each entry from the LFS.
- If task-level recovery is bypassed by MVS,
the end-of-memory (EOM) resource manager established by z/OS UNIX is run. It ensures
that the PFS has a last chance to clean up by calling vfs_recovery.
See the next topic on vn_recovery and vfs_recovery.
vn_recovery and vfs_recovery are
called to permit a PFS to recover resources when a user request ends
abnormally, or when the user's address space enters EOM processing
while a request to that PFS is active. This works as follows:
- On every VFS and vnode operation, the LFS makes an 8-byte recovery
area available to the PFS. This field is in the PFS's primary address
space, not in the user's address space. Its address is in the OSI.
- The PFS should set this field soon after entry, or when it has
resources that need protection. The field is used for recovery information,
or for the address of a recovery structure that is not in the user's
address space.
- The PFS clears the field on exit. The LFS also clears the field
as soon as the PFS returns, as it has meaning only during a call,
and presumably the area it points to is no longer valid. The PFS should
clear the field so that it cannot be invoked with bad data if the
user is canceled after the PFS has returned, but before the LFS can
zero out the field.
- If an abnormal end occurs and the LFS ESTAE routine finds this
area to be nonzero, the area is passed to the PFS with a call to vn_recovery
and cleared after this call.
See vn_recovery — Recover resources after an abend for
more details.
- If the EOM resource manager for a user address space finds this
area to be nonzero, the area is passed to the PFS with a call to vfs_recovery.
This can happen only for an abnormal end that bypasses normal ESTAE
processing, or when an address space is canceled during ESTAE processing.
See vfs_recovery — Recover resources at end-of-memory for more details.
- The PFS uses the information that is stored in the area during
vn_recovery or vfs_recovery to clean up whatever was in progress at
the time of the interruption.
The PFS can establish its own MVS dynamic
resource managers if it must perform special recovery for a user or z/OS UNIX task or address
space termination. This is not recommended, however, because severe
performance degradation occurs if these resource managers have to
be set up and removed on every operation.