mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-08 00:01:05 +02:00
Merge "mmc: block: flush request requeue after timeout."
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
dcee0e2c8e
@@ -1384,18 +1384,25 @@ out:
|
||||
static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req)
|
||||
{
|
||||
struct mmc_blk_data *md = mq->data;
|
||||
struct request_queue *q = mq->queue;
|
||||
struct mmc_card *card = md->queue.card;
|
||||
int ret = 0;
|
||||
|
||||
ret = mmc_flush_cache(card);
|
||||
if (ret) {
|
||||
pr_err("%s: %s: notify flush error to upper layers",
|
||||
req->rq_disk->disk_name, __func__);
|
||||
if (ret == -ETIMEDOUT) {
|
||||
pr_info("%s: requeue flush request after timeout", __func__);
|
||||
spin_lock_irq(q->queue_lock);
|
||||
blk_requeue_request(q, req);
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
ret = 0;
|
||||
goto exit;
|
||||
} else if (ret) {
|
||||
pr_err("%s: notify flush error to upper layers", __func__);
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
blk_end_request_all(req, ret);
|
||||
|
||||
exit:
|
||||
return ret ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ static void mmc_clk_scaling(struct mmc_host *host, bool from_wq);
|
||||
#define MMC_BKOPS_MAX_TIMEOUT (30 * 1000) /* max time to wait in ms */
|
||||
|
||||
/* Flushing a large amount of cached data may take a long time. */
|
||||
#define MMC_FLUSH_REQ_TIMEOUT_MS 30000 /* msec */
|
||||
#define MMC_FLUSH_REQ_TIMEOUT_MS 90000 /* msec */
|
||||
|
||||
static struct workqueue_struct *workqueue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user