generic: ENOSPC regression test in a multi-threaded scenario
authorPratik Rajesh Sampat <psampat@linux.ibm.com>
Tue, 1 Dec 2020 13:03:28 +0000 (18:33 +0530)
committerEryu Guan <guaneryu@gmail.com>
Sun, 6 Dec 2020 14:15:01 +0000 (22:15 +0800)
commit8b4f7e207cb2922168cfe0dadb8cf98c5270c4f7
tree32d26a6ae7e22ae274cf4a0995a48d114db8a4d3
parent445cbd798b88b045437f5d703b57c7955e8e4383
generic: ENOSPC regression test in a multi-threaded scenario

Test allocation strategies of the file system and validate space
anomalies as reported by the system versus the allocated by the
program.

The test is motivated by a bug in ext4 systems where-in ENOSPC is
reported by the file system even though enough space for allocations is
available[1].

[1]: https://patchwork.ozlabs.org/patch/1294003

Linux kernel patch series that fixes the above regression:
53f86b170dfa ("ext4: mballoc: add blocks to PA list under same spinlock
              after allocating blocks")
cf5e2ca6c990 ("ext4: mballoc: refactor ext4_mb_discard_preallocations()")
07b5b8e1ac40 ("ext4: mballoc: introduce pcpu seqcnt for freeing PA to
              improve ENOSPC handling")
8ef123fe02ca ("ext4: mballoc: refactor ext4_mb_good_group()")
993778306e79 ("ext4: mballoc: use lock for checking free blocks while
              retrying")

Suggested-by: Ritesh Harjani <riteshh@linux.ibm.com>
Co-authored-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Pratik Rajesh Sampat <psampat@linux.ibm.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
.gitignore
src/Makefile
src/t_enospc.c [new file with mode: 0644]
tests/generic/619 [new file with mode: 0755]
tests/generic/619.out [new file with mode: 0644]
tests/generic/group