Merge "mmc: block: flush request requeue after timeout."

This commit is contained in:
Linux Build Service Account
2013-10-01 05:09:17 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 12 additions and 5 deletions
+11 -4
View File
@@ -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;
}
+1 -1
View File
@@ -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;