Bug 202403

Summary: failed readahead spams syslog
Product: File System Reporter: LimeTech (tomm)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: dsterba
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19.16 Subsystem:
Regression: No Bisected commit-id:
Attachments: prevent failed readhead from spamming syslog

Description LimeTech 2019-01-24 18:52:24 UTC
Created attachment 280731 [details]
prevent failed readhead from spamming syslog

Probably due to this patch:
https://www.systutorials.com/linux-kernels/771332/btrfs-readpages-should-submit-io-as-read-ahead-linux-4-19/

When underlying device driver fails a REQ_RAHEAD the btrfs_end_io() function generates a syslog message.  This patch fixes it, but maybe a btrfs developer has a better method?

-tom
Comment 1 David Sterba 2019-01-25 12:10:40 UTC
Thanks for pointing it out, I've never seen the patch that added the REQ_RAHEAD bit as it was not CCed to the mailinglist. Readahead could fail for various reasons but should not be considered a hard error, unlike proper reads.

The proposed fix looks correct to me.
Comment 2 David Sterba 2019-03-07 14:56:33 UTC
Patch submitted https://patchwork.kernel.org/patch/10843055/ , queued for some 5.1-rc. Thanks for the report and fix.