• Josef Bacik's avatar
    btrfs: tests: initialize test inodes location · 675a4fc8
    Josef Bacik authored
    I noticed that sometimes the module failed to load because the self
    tests 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 initialize test inodes with a valid inode
    number so that we don't get random failures during self tests.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    675a4fc8
btrfs-tests.c 7.14 KB