diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-15 08:06:59 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:24 +0300 |
commit | eb331fe5a4e801dc11d96ba7fbda0a91c8bd626c (patch) | |
tree | bb8144cd4214f0bf41f7e8f680c1a09d8d4adda7 /fs/bcachefs/fs-io.c | |
parent | fcf01959eaa828b1005f8f30732949e64edb8c4d (diff) | |
download | linux-eb331fe5a4e801dc11d96ba7fbda0a91c8bd626c.tar.xz |
bcachefs: Check for stale dirty pointer before reads
Since we retry reads when we discover we read from a pointer that went
stale, if a dirty pointer is erroniously stale it would cause us to loop
retrying that read forever - unless we check before issuing the read,
while the btree is still locked, when we know that a dirty pointer
should never be stale.
This patch adds that check, along with printing some helpful debug info.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r-- | fs/bcachefs/fs-io.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 5fce958bafc9..9161125aec17 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -1043,8 +1043,6 @@ retry: sectors = min(sectors, k.k->size - offset_into_extent); - bch2_trans_unlock(trans); - if (readpages_iter) readpage_bio_extend(readpages_iter, &rbio->bio, sectors, extent_partial_reads_expensive(k)); |