btrfs: Add test to check if shrink works well with fstrim

There is a bug in trim code which leads to fstrim accessing beyond
device boundary.

The test case will check if fstrim, then shrink, then fstrim, all of
them works without problem.

The fix is titled "btrfs: trim: fix underflow in trim length to prevent
access beyond device boundary".

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Qu Wenruo
2020-07-30 20:17:35 +08:00
committed by Eryu Guan
parent 2b3de458c4
commit 912521c9fa
3 changed files with 65 additions and 0 deletions
+1
View File
@@ -219,3 +219,4 @@
214 auto quick send snapshot
215 auto quick
216 auto quick seed
217 auto quick trim dangerous