On Fri, 5 Apr 2024 at 18:20, Aleksandr Nogikh <[email protected]> wrote: > > On Fri, Apr 5, 2024 at 1:16 AM Kent Overstreet > <[email protected]> wrote: > > > > On Thu, Apr 04, 2024 at 10:33:07AM +0200, Dmitry Vyukov wrote: > > > On Thu, 4 Apr 2024 at 01:59, Kent Overstreet <[email protected]> > > > wrote: > > > > > > > > Hi - what would it take to get syzbot going for bcachefs? > > > > > > Hi Kent, > > > > > > There are 2 parts: > > > > > > The easy one: we need to enable it in syzbot configs. Should we > > > configure it as follows? > > > > > > CONFIG_BCACHEFS_FS=y > > > CONFIG_BCACHEFS_QUOTA=y > > > CONFIG_BCACHEFS_ERASURE_CODING=y > > > CONFIG_BCACHEFS_POSIX_ACL=y > > > CONFIG_BCACHEFS_DEBUG=y > > > # CONFIG_BCACHEFS_TESTS is not set > > > # CONFIG_BCACHEFS_LOCK_TIME_STATS is not set > > > # CONFIG_BCACHEFS_NO_LATENCY_ACCT is not set > > > CONFIG_BCACHEFS_SIX_OPTIMISTIC_SPIN=y > > > > > > In particular, I am interested in CONFIG_BCACHEFS_DEBUG. Does it > > > really add more debug checks rather than lots of console printing w/o > > > checks? Some "DEBUG" kernel configs are misleading here. Checks will > > > be useful on syzbot, lots of printing not so much. > > For the record: I've just sent > https://github.com/google/syzkaller/pull/4647 with syzbot config > updates. > > > > > CONFIG_BCACHEFS_DEBUG adds piles of assertions and no extra console > > printing :) > > > > > Second part: syzbot will need to exercise the fs in some useful way. > > > Is it just a "normal" fs with files, or something special? > > > > It's a normal - but multi device - filesystem, similar featureset to > > btrfs. > > > > > Is it mounted from an image, or an image-less fs? If it needs images, > > > how can they be created? > > > > apt install bcachefs-tools > > mkfs.bcachefs <dev> > > mount <dev> /mnt
We've enabled the configs, but we don't have good image seeds yet. Aleksandr tried to generate them, he is currently OOO, but maybe you can help meanwhile. He said that running: $ mkfs.bcachefs test.img gives this error (on a quite big image, I don't know how large exactly it was): insufficient space for superblocks: start 8 end 4104 > 4096 size 2048 Why could it give such an error and how to avoid it? Also what would be a good sets of options to generate seed images? We try to "sample" space of different images to create seeds. To give you an idea here is what we do for other file systems: https://github.com/google/syzkaller/blob/af24b0505c748561efb50f1d03c824d6642f6c0b/tools/syz-imagegen/imagegen.go#L60-L516
