From: Shaohua Li <shli@xxxxxx> discard error isn't fatal, don't flood discard error messages. Suggested-by: Ming Lei <tom.leiming@xxxxxxxxx> Signed-off-by: Shaohua Li <shli@xxxxxx> --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 14f7674..adb064a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -3090,6 +3090,8 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq, rq->__data_len = bio->bi_iter.bi_size; rq->bio = rq->biotail = bio; + if (bio_op(bio) == REQ_OP_DISCARD) + rq->rq_flags |= RQF_QUIET; if (bio->bi_disk) rq->rq_disk = bio->bi_disk; } -- 2.9.5