features.h (f7b4943dea48a572ad751ce1f18a245d43debe7e) features.h (1dfc0686c29a9bbd3a446a29f9ccde3dec3bc75a)
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _BCACHE_FEATURES_H
3#define _BCACHE_FEATURES_H
4
5#include <linux/bcache.h>
6#include <linux/kernel.h>
7#include <linux/types.h>
8

--- 65 unchanged lines hidden (view full) ---

74static inline void bch_clear_feature_##name(struct cache_sb *sb) \
75{ \
76 (sb)->feature_incompat &= \
77 ~BCH##_FEATURE_INCOMPAT_##flagname; \
78}
79
80BCH_FEATURE_INCOMPAT_FUNCS(large_bucket, LARGE_BUCKET);
81
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _BCACHE_FEATURES_H
3#define _BCACHE_FEATURES_H
4
5#include <linux/bcache.h>
6#include <linux/kernel.h>
7#include <linux/types.h>
8

--- 65 unchanged lines hidden (view full) ---

74static inline void bch_clear_feature_##name(struct cache_sb *sb) \
75{ \
76 (sb)->feature_incompat &= \
77 ~BCH##_FEATURE_INCOMPAT_##flagname; \
78}
79
80BCH_FEATURE_INCOMPAT_FUNCS(large_bucket, LARGE_BUCKET);
81
82static inline bool bch_has_unknown_compat_features(struct cache_sb *sb)
83{
84 return ((sb->feature_compat & ~BCH_FEATURE_COMPAT_SUPP) != 0);
85}
86
87static inline bool bch_has_unknown_ro_compat_features(struct cache_sb *sb)
88{
89 return ((sb->feature_ro_compat & ~BCH_FEATURE_RO_COMPAT_SUPP) != 0);
90}
91
92static inline bool bch_has_unknown_incompat_features(struct cache_sb *sb)
93{
94 return ((sb->feature_incompat & ~BCH_FEATURE_INCOMPAT_SUPP) != 0);
95}
96
82int bch_print_cache_set_feature_compat(struct cache_set *c, char *buf, int size);
83int bch_print_cache_set_feature_ro_compat(struct cache_set *c, char *buf, int size);
84int bch_print_cache_set_feature_incompat(struct cache_set *c, char *buf, int size);
85
86#endif
97int bch_print_cache_set_feature_compat(struct cache_set *c, char *buf, int size);
98int bch_print_cache_set_feature_ro_compat(struct cache_set *c, char *buf, int size);
99int bch_print_cache_set_feature_incompat(struct cache_set *c, char *buf, int size);
100
101#endif