diff options
Diffstat (limited to 'libbcache/notify.h')
-rw-r--r-- | libbcache/notify.h | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/libbcache/notify.h b/libbcache/notify.h index 80d65876..e1971dbc 100644 --- a/libbcache/notify.h +++ b/libbcache/notify.h @@ -7,16 +7,34 @@ #ifndef _NOTIFY_H #define _NOTIFY_H -void bch_notify_cache_set_read_write(struct cache_set *); -void bch_notify_cache_set_read_only(struct cache_set *); -void bch_notify_cache_set_stopped(struct cache_set *); - -void bch_notify_cache_read_write(struct cache *); -void bch_notify_cache_read_only(struct cache *); -void bch_notify_cache_added(struct cache *); -void bch_notify_cache_removing(struct cache *); -void bch_notify_cache_removed(struct cache *); -void bch_notify_cache_remove_failed(struct cache *); -void bch_notify_cache_error(struct cache *, bool); +#ifndef NO_BCACHE_NOTIFY + +void bch_notify_fs_read_write(struct cache_set *); +void bch_notify_fs_read_only(struct cache_set *); +void bch_notify_fs_stopped(struct cache_set *); + +void bch_notify_dev_read_write(struct cache *); +void bch_notify_dev_read_only(struct cache *); +void bch_notify_dev_added(struct cache *); +void bch_notify_dev_removing(struct cache *); +void bch_notify_dev_removed(struct cache *); +void bch_notify_dev_remove_failed(struct cache *); +void bch_notify_dev_error(struct cache *, bool); + +#else + +static inline void bch_notify_fs_read_write(struct cache_set *c) {} +static inline void bch_notify_fs_read_only(struct cache_set *c) {} +static inline void bch_notify_fs_stopped(struct cache_set *c) {} + +static inline void bch_notify_dev_read_write(struct cache *ca) {} +static inline void bch_notify_dev_read_only(struct cache *ca) {} +static inline void bch_notify_dev_added(struct cache *ca) {} +static inline void bch_notify_dev_removing(struct cache *ca) {} +static inline void bch_notify_dev_removed(struct cache *ca) {} +static inline void bch_notify_dev_remove_failed(struct cache *ca) {} +static inline void bch_notify_dev_error(struct cache *ca, bool b) {} + +#endif #endif /* _NOTIFY_H */ |