Partager via


Error Handler Functions (Compact 2013)

3/26/2014

The following table describes the error handler functions in the generic error handler plug-in.

Function

Description

ReportDiskError

This function is called by FSDMGR when a disk IOCTL fails.

InitDiskErrorHandler

This function (optional) is called by FSDMGR when a disk volume is mounted.

DeinitDiskErrorHandler

This function (optional) is called by FSDMGR when a disk is unmounted.

ReportRetrySuccess

This function (optional) is called by FSDMGR when ReportDiskError returns FSDERR_RETRY and then the disk I/O attempt is successful after a retry.

When FSDMGR mounts a file system on a device, it checks the device registry to see if an error handler has been specified. If an error handler is specified, FSDMGR will load the error handler and call InitDiskErrorHandler if the function has been exported.

When a disk volume has I/O failures, FSDMGR will call the ReportDiskError function to report the error. Based on the return value, FSDMGR will:

  • Retry the operation if FSDERR_RETRY is returned. If, after a retry, the operation succeeded, FSDMGR will call the function ReportRetrySuccess if the function was previously exported.

  • Fail the operation if FSDERR_FAIL is returned.

  • Reboot the device if FSDERR_REBOOT is returned.

  • Ignore the failure if FSDERR_IGNORE is returned.

    Note

    Only use this return value for optional IOCTLs. Do not use for regular read/write activities.

If the volume is unmounted, FSDMGR will call the optional DeinitDiskErrorHandler and unload the error handler.

In This Section

See Also

Concepts

File System Driver Manager Error Handler Support