]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic: test reading a large directory while renaming its files
authorFilipe Manana <fdmanana@suse.com>
Tue, 5 Dec 2023 16:39:20 +0000 (16:39 +0000)
committerZorro Lang <zlang@kernel.org>
Sun, 10 Dec 2023 13:38:00 +0000 (21:38 +0800)
commited058f1c64746b32e2786bf344ae1ff5fd78dfb0
treef54efb3e64cab64f83ffd1f622b42f24705437cb
parentb05c808ce4a4686b40c4e0b5029cb889c39f3856
generic: test reading a large directory while renaming its files

Test that on a fairly large directory if we keep renaming files while
holding the directory open and doing readdir(3) calls, we don't end up
in an infinite loop.

This exercise a bug that existed in btrfs and was fixed in kernel 6.5
by commit 9b378f6ad48c ("btrfs: fix infinite directory reads").

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
.gitignore
src/Makefile
src/readdir-while-renames.c [new file with mode: 0644]
tests/generic/736 [new file with mode: 0755]
tests/generic/736.out [new file with mode: 0644]