btrfs: selftests: remove impossible inline extent at non-zero file offset
authorQu Wenruo <wqu@suse.com>
Fri, 16 Sep 2022 07:28:35 +0000 (15:28 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:47 +0000 (18:00 +0100)
commitd52a1365258b5781c2635937afa91af66322d981
treed96b6e0803a692ffcda61224e2e53effb8ee5185
parentaa5d3003ddee8d7c5c517db072f888e114ff1529
btrfs: selftests: remove impossible inline extent at non-zero file offset

In our inode-tests.c, we create an inline offset at file offset 5, which
is no longer possible since the introduction of tree-checker.

Thus I don't think we should spend time maintaining some corner cases
which are already ruled out by tree-checker.

So this patch will:

- Change the inline extent to start at file offset 0

  Also change its length to 6 to cover the original length

- Add an extra ASSERT() for btrfs_add_extent_mapping()

  This is to make sure tree-checker is working correctly.

- Update the inode selftest

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_map.c
fs/btrfs/tests/inode-tests.c