diff mbox

[V3,3/3] block: don't print message for discard error

Message ID 483d098388b5e697dad0b6bde952e8659d8fe545.1507072136.git.shli@fb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shaohua Li Oct. 4, 2017, 2:52 p.m. UTC
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>
---
 block/blk-core.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ming Lei Oct. 7, 2017, 4:48 a.m. UTC | #1
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 mbox

Patch

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;
 }