* md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ?
@ 2025-08-06 13:34 chen cheng
2025-08-07 1:35 ` Yu Kuai
0 siblings, 1 reply; 2+ messages in thread
From: chen cheng @ 2025-08-06 13:34 UTC (permalink / raw)
To: linux-raid
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ?
2025-08-06 13:34 md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ? chen cheng
@ 2025-08-07 1:35 ` Yu Kuai
0 siblings, 0 replies; 2+ messages in thread
From: Yu Kuai @ 2025-08-07 1:35 UTC (permalink / raw)
To: chen cheng, linux-raid, yukuai (C)
Hi,
在 2025/08/06 21:34, chen cheng 写道:
> 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?
The mdraid really doesn't support REQ_NOWAIT, for now the flag is just
ignored and I think BLK_FEAT_NOWAIT should be cleared for raid1/10/456.
BTW, support it will require a lot of work, because IO error handling is
too complicated, we don't want to record badblocks for nowait IO
failure, however, if write disk a succeed while write disk b failed,
whatever we do will violate the semantics of nowait.
Thanks,
Kuai
>
> .
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-07 1:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 13:34 md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ? chen cheng
2025-08-07 1:35 ` Yu Kuai
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).