mmc: block: do not pack REQ_FUA request
This change will prevent packing of a request marked with REQ_FUA flag, because it has the same semantics as REQ_FLUSH. Also packing statistics are updated with FUA stop reason. Change-Id: Iaad37044ec43f93e898ed0c011b0bce7b91ae13d Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This commit is contained in:
parent
aa4228ea9d
commit
8cd10b13a9
3 changed files with 16 additions and 0 deletions
|
@ -2027,6 +2027,9 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req)
|
|||
!IS_ALIGNED(blk_rq_sectors(cur), 8))
|
||||
goto no_packed;
|
||||
|
||||
if (cur->cmd_flags & REQ_FUA)
|
||||
goto no_packed;
|
||||
|
||||
mmc_blk_clear_packed(mqrq);
|
||||
|
||||
max_blk_count = min(card->host->max_blk_count,
|
||||
|
@ -2071,6 +2074,11 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req)
|
|||
break;
|
||||
}
|
||||
|
||||
if (next->cmd_flags & REQ_FUA) {
|
||||
MMC_BLK_UPDATE_STOP_REASON(stats, FUA);
|
||||
break;
|
||||
}
|
||||
|
||||
if (rq_data_dir(cur) != rq_data_dir(next)) {
|
||||
MMC_BLK_UPDATE_STOP_REASON(stats, WRONG_DATA_DIR);
|
||||
break;
|
||||
|
|
|
@ -531,6 +531,13 @@ static ssize_t mmc_wr_pack_stats_read(struct file *filp, char __user *ubuf,
|
|||
pack_stats->pack_stop_reason[RANDOM]);
|
||||
strlcat(ubuf, temp_buf, cnt);
|
||||
}
|
||||
if (pack_stats->pack_stop_reason[FUA]) {
|
||||
snprintf(temp_buf, TEMP_BUF_SIZE,
|
||||
"%s: %d times: fua request\n",
|
||||
mmc_hostname(card->host),
|
||||
pack_stats->pack_stop_reason[FUA]);
|
||||
strlcat(ubuf, temp_buf, cnt);
|
||||
}
|
||||
|
||||
spin_unlock(&pack_stats->lock);
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ enum mmc_packed_stop_reasons {
|
|||
THRESHOLD,
|
||||
LARGE_SEC_ALIGN,
|
||||
RANDOM,
|
||||
FUA,
|
||||
MAX_REASONS,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue