linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Aleksei Marov <alekseymmm@mail.ru>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: Set req quiet flag if bio is quiet
Date: Sat, 27 Jun 2020 16:00:11 +0800	[thread overview]
Message-ID: <CACVXFVObNuK=Uii_Tm2pSEEm2RAeECeha97-q=+XkDsuD6Vmsg@mail.gmail.com> (raw)
In-Reply-To: <bdef634a3a41dbecfd3d74f6bd25332445772902.camel@mail.ru>

On Sat, Jun 27, 2020 at 2:12 AM Aleksei Marov <alekseymmm@mail.ru> wrote:
>
> 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;
>  }

BIO_QUIET consumer is fs code, and RQF_QUIET consumer is block layer,
so you think
the two consumers' expectation is same?

-- 
Ming Lei

  reply	other threads:[~2020-06-27  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 14:42 [PATCH] block: Set req quiet flag if bio is quiet Aleksei Marov
2020-06-27  8:00 ` Ming Lei [this message]
2020-06-29 20:31   ` Aleksei Marov
2020-06-29 20:44   ` Jens Axboe
2020-07-02 15:40     ` Aleksei Marov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACVXFVObNuK=Uii_Tm2pSEEm2RAeECeha97-q=+XkDsuD6Vmsg@mail.gmail.com' \
    --to=tom.leiming@gmail.com \
    --cc=alekseymmm@mail.ru \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).