Messages in this thread | | | From | Avri Altman <> | Subject | Re: [PATCH 1/2] mmc: block: Issue flush only if allowed | Date | Fri, 2 Apr 2021 07:46:51 +0000 |
| |
>> @@ -1473,6 +1473,9 @@ static int mmc_blk_cqe_issue_flush(struct mmc_queue *mq, struct request *req) >> struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req); >> struct mmc_request *mrq = mmc_blk_cqe_prep_dcmd(mqrq, req); >> >> + if (mmc_card_mmc(mq->card) && !mmc_flush_allowed(mq->card)) >> + return 0;
> Returning 0 means the flush was issued successfully. i.e. it is in > flight. > > Instead, a call to blk_mq_end_request(req, BLK_STS_OK) is needed, > and mmc_blk_mq_issue_rq() must be amended so that it will return > MMC_REQ_DONE for this case. Done.
Thanks, Avri
| |