@@ -1550,6 +1550,8 @@ static blk_qc_t dm_make_request(struct request_queue *q, struct bio *bio)
if (!(bio->bi_opf & REQ_RAHEAD))
queue_io(md, bio);
+ else if (bio->bi_opf & REQ_NOWAIT)
+ bio_wouldblock_error(bio);
else
bio_io_error(bio);
return BLK_QC_T_NONE;
@@ -2066,6 +2068,7 @@ int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
case DM_TYPE_DAX_BIO_BASED:
dm_init_normal_md_queue(md);
blk_queue_make_request(md->queue, dm_make_request);
+ queue_flag_set_unlocked(QUEUE_FLAG_NOWAIT, md->queue);
/*
* DM handles splitting bios as needed. Free the bio_split bioset
* since it won't be used (saves 1 process per bio-based DM device).