diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-01 11:42:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-05 11:08:35 +0100 |
commit | 8dda141d0b16031e0b24d6fed46f69873e000f08 (patch) | |
tree | 3a2fa1c900fe071ee8fd9092cb9521d9629acbbc /block | |
parent | b699b0067c0ba01ca7068470d42d76e34eaafe84 (diff) | |
download | linux-stable-8dda141d0b16031e0b24d6fed46f69873e000f08.tar.gz linux-stable-8dda141d0b16031e0b24d6fed46f69873e000f08.tar.bz2 linux-stable-8dda141d0b16031e0b24d6fed46f69873e000f08.zip |
Revert "block: ratelimit handle_bad_sector() message"
This reverts commit f86b9bf6228bb334fe1addcd566a658ecbd08f7e which is
commit f4ac712e4fe009635344b9af5d890fe25fcc8c0d upstream.
Jari Ruusu writes:
Above change "block: ratelimit handle_bad_sector() message"
upstream commit f4ac712e4fe009635344b9af5d890fe25fcc8c0d
in 4.19.154 kernel is not completely OK.
Removing casts from arguments 4 and 5 produces these compile warnings:
...
For 64 bit systems it is only compile time cosmetic warning. For 32 bit
system + CONFIG_LBDAF=n it introduces bugs: output formats are "%llu" and
passed parameters are 32 bits. That is not OK.
Upstream kernels have hardcoded 64 bit sector_t. In older stable trees
sector_t can be either 64 or 32 bit. In other words, backport of above patch
needs to keep those original casts.
And Tetsuo Handa writes:
Indeed, commit f4ac712e4fe00963 ("block: ratelimit handle_bad_sector() message")
depends on commit 72deb455b5ec619f ("block: remove CONFIG_LBDAF") which was merged
into 5.2 kernel.
So let's revert it.
Reported-by: Jari Ruusu <jariruusu@users.sourceforge.net>
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 445b878e3519..ce3710404544 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2127,10 +2127,11 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector) { char b[BDEVNAME_SIZE]; - pr_info_ratelimited("attempt to access beyond end of device\n" - "%s: rw=%d, want=%llu, limit=%llu\n", - bio_devname(bio, b), bio->bi_opf, - bio_end_sector(bio), maxsector); + printk(KERN_INFO "attempt to access beyond end of device\n"); + printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n", + bio_devname(bio, b), bio->bi_opf, + (unsigned long long)bio_end_sector(bio), + (long long)maxsector); } #ifdef CONFIG_FAIL_MAKE_REQUEST |