bcachefs: Fix an unhandled transaction restart
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 5 Aug 2021 17:02:39 +0000 (13:02 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:10 +0000 (17:09 -0400)
commit3737e0ddfbce4791a6415fa685e235b03924ff01
treee277824d73f9e53eb07352ecc7df7b560caa4b2a
parente3637266024de9bafa64f315d7d03cf0291ace6a
bcachefs: Fix an unhandled transaction restart

__bch2_read() -> __bch2_read_extent() -> bch2_bucket_io_time_reset() may
cause a transaction restart, which we don't return an error for because
it doesn't prevent us from making forward progress on the read we're
submitting.

Instead, change __bch2_read() and bchfs_read() to check for transaction
restarts.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/fs-io.c
fs/bcachefs/io.c