generic/260: f2fs is also special
authorSun Ke <sunke32@huawei.com>
Wed, 30 Jun 2021 11:37:36 +0000 (19:37 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Jul 2021 09:51:13 +0000 (17:51 +0800)
commitc360cd10a1b883c7822d78f55fdfa5d8726212eb
treef9e6eac38006d5997b0ff6763e7e621d7a6b2e25
parent9e31513f5fbd03a997b43197bbe594ae9a1da103
generic/260: f2fs is also special

It fail on f2fs:

 [+] Default length with start set (should succeed)
 [+] Length beyond the end of fs (should succeed)
 [+] Length beyond the end of fs with start set (should succeed)
+After the full fs discard 0 bytes were discarded however the file system is 12882804736 bytes long.
+It seems that fs logic handling len argument overflows

The root cause is f2fs can tag a special flag TRIMMED_FLAG to
indicate the whole filesystem is trimmed, so after mkfs/fstrim(),
following fstrim() won't trim any block.

Suggested-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Sun Ke <sunke32@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/260