BLK_QC_T_NONE and polled I/O

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

 



I have a question BLK_QC_T_NONE interaction with polled I/O.

Given that blk_poll() returns immediately in case of blk_qc_t_valid(cookie), the following cases return BLK_QC_T_NONE which seem like they would be problematic with polling:

generic_make_request()
...
        if (current->bio_list) {
                bio_list_add(&current->bio_list[0], bio);
                goto out;     >>> this will return BLK_QC_T_NONE
        }

In this case the request is deferred but should get a cookie eventually.  How would the submitter poll for this request?

__blk_mq_issue_directly()
...
        case BLK_STS_RESOURCE:
        case BLK_STS_DEV_RESOURCE:
                blk_mq_update_dispatch_busy(hctx, true);
                __blk_mq_requeue_request(rq);
                break;

In this case, cookie is not updated and would keep its default BLK_QC_T_NONE value from blk_mq_make_request().  However, __blk_mq_requeue_request() will release the original cookie and this request will eventually be resubmitted, so how would the submitter poll for the completion of this request?

blk_mq_try_issue_directly()
...
        ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false, true);
        if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE)
                blk_mq_request_bypass_insert(rq, false, true);


Incidentally, I don't see BLK_QC_T_EAGAIN used anywhere, should it be?

Thanks.

--bijan



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux