Message ID | 483d098388b5e697dad0b6bde952e8659d8fe545.1507072136.git.shli@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 04, 2017 at 07:52:45AM -0700, Shaohua Li wrote: > From: Shaohua Li <shli@fb.com> > > discard error isn't fatal, don't flood discard error messages. > > Suggested-by: Ming Lei <tom.leiming@gmail.com> > Signed-off-by: Shaohua Li <shli@fb.com> Reviewed-by: Ming Lei <ming.lei@redhat.com>
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; }