post_swap_in_meta
Name
post_swap_in_meta — Allows modules to perform actions immediately after the metadata file has been read from the spool. This hook is called even when the metadata fetch fails.
Synopsis
#include "hooks/core/swap_in_meta.h"
| int **core_post_swap_in_meta** (
| closure, | |
| | msg, | |
| | flags, | |
| | serror, | |
| | rv)
; | |
void * <var class="pdparam">closure</var>
;
ec_message * <var class="pdparam">msg</var>
;
int <var class="pdparam">flags</var>
;
int <var class="pdparam">serror</var>
;
int * <var class="pdparam">rv</var>
;
Description
Allows modules to perform actions immediately after the metadata file has been read from the spool. This hook is called even when the metadata fetch fails.
- closure
-
A pointer to the closure function.
- msg
-
An
ec_message
whose metadata has been swapped in. For documentation of this data structure see “ec_message”. - flags
-
One of
METAF_MSG
orMETAF_DICT
. - serror
-
On failure, this parameter will contain the
errno
value. - rv
-
Indicates that the metadata fetch succeeded if
*rv
isIO_DONE
) or failed if*rv
isIO_TRANS_FAIL
orIO_FAIL
.
If this hook returns 1
, then any further processing for the metadata swap-in will be skipped. The hook should only return 1
if it fails and, in this case, it should set *rv
to IO_FAIL
.
This hook will be called in the Scheduler
thread.