summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/aha/src/aha-helpers.h
blob: d9cf9b3295d43b4161299a80dbf6e3c9eef4bea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _AHA_HELPERS_H
#define _AHA_HELPERS_H

#include "aha.h"

#define GF_AHA "aha"

struct aha_conf *aha_conf_new ();

void aha_conf_destroy (struct aha_conf *conf);

struct aha_fop *aha_fop_new ();

void aha_fop_destroy (struct aha_fop *fop);

#define AHA_DESTROY_LOCAL(frame)                        \
        do {                                            \
                struct aha_fop *fop = frame->local;          \
                aha_fop_destroy (fop);                  \
                frame->local = NULL;                    \
        } while (0)                                     \

#endif /* _AHA_HELPERS_H */