post_swap_in_meta

March 26, 2020

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.

Parameters

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 or METAF_DICT.

serror

On failure, this parameter will contain the errno value.

rv

Indicates that the metadata fetch succeeded if *rv is IO_DONE) or failed if *rv is IO_TRANS_FAIL or IO_FAIL.

Return Values

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.

Threading

This hook will be called in the Scheduler thread.