]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic/459: improve shutdown/read-only check to accommodate bcachefs
authorBrian Foster <bfoster@redhat.com>
Wed, 29 Nov 2023 20:16:14 +0000 (15:16 -0500)
committerZorro Lang <zlang@kernel.org>
Sat, 9 Dec 2023 04:51:34 +0000 (12:51 +0800)
commit86f0e4f7c18a1c99404b4aa1bd5bedee7ff72a1b
tree3dfea43ab2f05c534034c4564b213f18438da134
parent9812168a1255b40df332d160906bc16e0279cc7b
generic/459: improve shutdown/read-only check to accommodate bcachefs

generic/459 occasionally fails on bcachefs because the deliberately
induced I/O errors caused by exhausting the overprovisioned thin
pool can lead to filesystem shutdown. This test considers this
expected behavior on certain fs', but only checks for the ext4
remount read-only behavior. bcachefs does a similar emergency
read-only transition in response to certain I/O errors, but it
behaves more similar to an XFS shutdown and doesn't necessarily
reflect "ro" state in the mount table (unless induced by userspace).

Since the test already runs a touch command to help trigger the ext4
error handling sequence, this can be tweaked to serve double duty
and also more accurately detect read-only status on bcachefs.
Refactor into a small helper, check for touch command failure, and
consider the fs read-only if either that or the mount entry check
indicates it.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/459