x(bi_background_target, 16) \
x(bi_erasure_code, 16)
-#define BCH_INODE_FIELDS_INHERIT() \
- x(bi_data_checksum) \
- x(bi_compression) \
- x(bi_project) \
- x(bi_background_compression) \
- x(bi_data_replicas) \
- x(bi_promote_target) \
- x(bi_foreground_target) \
- x(bi_background_target) \
- x(bi_erasure_code)
+/* subset of BCH_INODE_FIELDS */
+#define BCH_INODE_OPTS() \
+ x(data_checksum, 8) \
+ x(compression, 8) \
+ x(project, 32) \
+ x(background_compression, 8) \
+ x(data_replicas, 8) \
+ x(promote_target, 16) \
+ x(foreground_target, 16) \
+ x(background_target, 16) \
+ x(erasure_code, 16)
enum {
/*
inode_u->bi_otime = now;
if (parent) {
-#define x(_name) inode_u->_name = parent->_name;
- BCH_INODE_FIELDS_INHERIT()
+#define x(_name, ...) inode_u->bi_##_name = parent->bi_##_name;
+ BCH_INODE_OPTS()
#undef x
}
}
NO_SB_OPT, false) \
BCH_OPT(version_upgrade, u8, OPT_MOUNT, \
OPT_BOOL(), \
- NO_SB_OPT, false)
+ NO_SB_OPT, false) \
+ BCH_OPT(project, u8, OPT_INTERNAL, \
+ OPT_BOOL(), \
+ NO_SB_OPT, false) \
struct bch_opts {
#define BCH_OPT(_name, _bits, ...) unsigned _name##_defined:1;
/* inode opts: */
-#define BCH_INODE_OPTS() \
- x(data_checksum, 8) \
- x(compression, 8) \
- x(background_compression, 8) \
- x(data_replicas, 8) \
- x(promote_target, 16) \
- x(foreground_target, 16) \
- x(background_target, 16) \
- x(erasure_code, 16)
-
struct bch_io_opts {
#define x(_name, _bits) unsigned _name##_defined:1;
BCH_INODE_OPTS()