Compile error from latest linux git master branch
I saw that bcachefs was pulled into Linus' tree, so I pulled it down and tried to compile but it bombs with:
CC fs/bcachefs/btree_io.o
In file included from fs/bcachefs/btree_io.c:11:
fs/bcachefs/btree_io.c: In function ‘bch2_btree_post_write_cleanup’:
fs/bcachefs/btree_update_interior.h:274:36: error: array subscript 0 is outside the bounds of an interior zero-length array ‘struct bkey_packed[0]’ [-Werror=zero-length-bounds]
274 | __bch_btree_u64s_remaining(c, b, &bne->keys.start[0]);
| ^~~~~~~~~~~~~~~~~~~
In file included from fs/bcachefs/bcachefs.h:206,
from fs/bcachefs/btree_io.c:3:
fs/bcachefs/bcachefs_format.h:2344:21: note: while referencing ‘start’
2344 | struct bkey_packed start[0];
| ^~~~~
In file included from fs/bcachefs/btree_io.c:11:
fs/bcachefs/btree_io.c: In function ‘bch2_btree_init_next’:
fs/bcachefs/btree_update_interior.h:274:36: error: array subscript 0 is outside the bounds of an interior zero-length array ‘struct bkey_packed[0]’ [-Werror=zero-length-bounds]
274 | __bch_btree_u64s_remaining(c, b, &bne->keys.start[0]);
| ^~~~~~~~~~~~~~~~~~~
In file included from fs/bcachefs/bcachefs.h:206,
from fs/bcachefs/btree_io.c:3:
fs/bcachefs/bcachefs_format.h:2344:21: note: while referencing ‘start’
2344 | struct bkey_packed start[0];
| ^~~~~ cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:243: fs/bcachefs/btree_io.o] Error 1 make[3]: *** [scripts/Makefile.build:480: fs/bcachefs] Error 2 make[2]: *** [scripts/Makefile.build:480: fs] Error 2 make[1]: *** [/local/src/kernel/git/linux/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
And my .config file settings for BCHACEFS setting are the following:
$ grep BCACHE .config CONFIG_BCACHE=y # CONFIG_BCACHE_DEBUG is not set # CONFIG_BCACHE_ASYNC_REGISTRATION is not set CONFIG_FS_MBCACHE=y CONFIG_BCACHEFS_FS=y CONFIG_BCACHEFS_QUOTA=y CONFIG_BCACHEFS_POSIX_ACL=y CONFIG_BCACHEFS_DEBUG_TRANSACTIONS=y # CONFIG_BCACHEFS_DEBUG is not set # CONFIG_BCACHEFS_TESTS is not set # CONFIG_BCACHEFS_LOCK_TIME_STATS is not set # CONFIG_BCACHEFS_NO_LATENCY_ACCT is not set