On 16.12.20 г. 18:22 ч., Josef Bacik wrote:
> While testing other things I was noticing that sometimes my VM would
> fail to load the btrfs module because the self test failed like this
> 
> BTRFS: selftest: fs/btrfs/tests/inode-tests.c:963 miscount, wanted 1, got 0
> 
> This turned out to be because sometimes the btrfs ino would be the btree
> inode number, and thus we'd skip calling the set extent delalloc bit
> helper, and thus not adjust ->outstanding_extents.  Fix this by making
> sure we init test inodes with a valid inode number so that we don't get
> random failures during self tests.

This warrants slightly more explanation why this initialization is
required, namely that newly allocated indoes are initialized by passing
a set callback, since we are acquiring inodes for tests we need to
simulate this behavior by, effectively, open coding
btrfs_init_locked_inode.

<snip>

Reply via email to