[lkml]   [2019]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.0 040/146] btrfs: dont report readahead errors and dont update statistics
5.0-stable review patch.  If anyone has any objections, please let me know.


From: David Sterba <>

commit 0cc068e6ee59c1fffbfa977d8bf868b7551d80ac upstream.

As readahead is an optimization, all errors are usually filtered out,
but still properly handled when the real read call is done. The commit
5e9d398240b2 ("btrfs: readpages() should submit IO as read-ahead") added
REQ_RAHEAD to readpages() because that's only used for readahead
(despite what one would expect from the callback name).

This causes a flood of messages and inflated read error stats, so skip
reporting in case it's readahead.

Reported-by: LimeTech <>
Fixes: 5e9d398240b2 ("btrfs: readpages() should submit IO as read-ahead")
CC: # 4.19+
Signed-off-by: David Sterba <>
Signed-off-by: Greg Kroah-Hartman <>

fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6413,7 +6413,7 @@ static void btrfs_end_bio(struct bio *bi
if (bio_op(bio) == REQ_OP_WRITE)
- else
+ else if (!(bio->bi_opf & REQ_RAHEAD))
if (bio->bi_opf & REQ_PREFLUSH)

 \ /
  Last update: 2019-04-01 20:39    [W:0.533 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site