linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: Set req quiet flag if bio is quiet
@ 2020-06-26 14:42 Aleksei Marov
  2020-06-27  8:00 ` Ming Lei
  0 siblings, 1 reply; 5+ messages in thread
From: Aleksei Marov @ 2020-06-26 14:42 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

The current behavior is that if bio flagged as BIO_QUIETis submitted to request based block device then the request
that wraps this bio in a queue is not quiet. RQF_FLAG is not
set anywhere. Hence, if errors happen we can see error
messages (e.g. in print_req_error) even though bio is quiet.
This patch fixes that by setting the flag in blk_rq_bio_prep.

Signed-off-by: Aleksei Marov <alekseymmm@mail.ru>
---
 block/blk.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/blk.h b/block/blk.h
index b5d1f0f..04ca4e0 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -108,6 +108,9 @@ static inline void blk_rq_bio_prep(struct request
*rq, struct bio *bio,

        if (bio->bi_disk)
                rq->rq_disk = bio->bi_disk;
+
+       if (bio_flagged(bio, BIO_QUIET))
+               rq->rq_flags |= RQF_QUIET;
 }

 #ifdef CONFIG_BLK_DEV_INTEGRITY
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-02 15:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 14:42 [PATCH] block: Set req quiet flag if bio is quiet Aleksei Marov
2020-06-27  8:00 ` Ming Lei
2020-06-29 20:31   ` Aleksei Marov
2020-06-29 20:44   ` Jens Axboe
2020-07-02 15:40     ` Aleksei Marov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).