summaryrefslogtreecommitdiff
path: root/libbcache/notify.h
blob: 8823c06cda4eeef2b0c62e7e90beac9f0a0ded03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Code for sending uevent notifications to user-space.
 *
 * Copyright 2015 Datera, Inc.
 */

#ifndef _NOTIFY_H
#define _NOTIFY_H

#ifndef NO_BCACHE_NOTIFY

void bch_notify_fs_read_write(struct bch_fs *);
void bch_notify_fs_read_only(struct bch_fs *);
void bch_notify_fs_stopped(struct bch_fs *);

void bch_notify_dev_read_write(struct bch_dev *);
void bch_notify_dev_read_only(struct bch_dev *);
void bch_notify_dev_added(struct bch_dev *);
void bch_notify_dev_removing(struct bch_dev *);
void bch_notify_dev_removed(struct bch_dev *);
void bch_notify_dev_remove_failed(struct bch_dev *);
void bch_notify_dev_error(struct bch_dev *, bool);

#else

static inline void bch_notify_fs_read_write(struct bch_fs *c) {}
static inline void bch_notify_fs_read_only(struct bch_fs *c) {}
static inline void bch_notify_fs_stopped(struct bch_fs *c) {}

static inline void bch_notify_dev_read_write(struct bch_dev *ca) {}
static inline void bch_notify_dev_read_only(struct bch_dev *ca) {}
static inline void bch_notify_dev_added(struct bch_dev *ca) {}
static inline void bch_notify_dev_removing(struct bch_dev *ca) {}
static inline void bch_notify_dev_removed(struct bch_dev *ca) {}
static inline void bch_notify_dev_remove_failed(struct bch_dev *ca) {}
static inline void bch_notify_dev_error(struct bch_dev *ca, bool b) {}

#endif

#endif /* _NOTIFY_H */