Re: md: Does the thread entering the wait queue violate the semantics of REQ_NOWAIT in raid5_make_request() ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

.






[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux