linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chen cheng <chenchneg33@gmail.com>
To: linux-raid@vger.kernel.org
Subject: md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ?
Date: Wed, 6 Aug 2025 21:34:43 +0800	[thread overview]
Message-ID: <CAD8sxFLS7A3HLL3diYRU5fHxCUb_y-QJS666k5cPOgQ8wGFDjw@mail.gmail.com> (raw)

static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
{
        ...

        if ((bi->bi_opf & REQ_NOWAIT) &&
            (conf->reshape_progress != MaxSector) &&
            get_reshape_loc(mddev, conf, logical_sector) ==
LOC_INSIDE_RESHAPE) {
                bio_wouldblock_error(bi);
                if (rw == WRITE)
                        md_write_end(mddev);
                return true;
        }

        if (likely(conf->reshape_progress == MaxSector)) {
                ...
        } else {
                add_wait_queue(&conf->wait_for_reshape, &wait);
                on_wq = true;
        }

        ...
}


In raid5_make_request(), if a reshape is progressing and the current
IO request is not within the reshape range and has the REQ_NOWAIT
flag, does the thread entering the wait queue violate the semantics of
REQ_NOWAIT?

             reply	other threads:[~2025-08-06 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 13:34 chen cheng [this message]
2025-08-07  1:35 ` md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ? Yu Kuai

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=CAD8sxFLS7A3HLL3diYRU5fHxCUb_y-QJS666k5cPOgQ8wGFDjw@mail.gmail.com \
    --to=chenchneg33@gmail.com \
    --cc=linux-raid@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).