提交 98fb1ffd 编写于 作者: K Kevin Cernekee 提交者: Richard Weinberger

UBI: block: Add missing cache flushes

Block drivers are responsible for calling flush_dcache_page() on each
BIO request. This operation keeps the I$ coherent with the D$ on
architectures that don't have hardware coherency support. Without this
flush, random crashes are seen when executing user programs from an ext4
filesystem backed by a ubiblock device.

This patch is based on the change implemented in commit 2d4dc890
("block: add helpers to run flush_dcache_page() against a bio and a
request's pages").

Fixes: 9d54c8a3 ("UBI: R/O block driver on top of UBI volumes")
Signed-off-by: NKevin Cernekee <cernekee@chromium.org>
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 5ebe6afa
...@@ -310,6 +310,8 @@ static void ubiblock_do_work(struct work_struct *work) ...@@ -310,6 +310,8 @@ static void ubiblock_do_work(struct work_struct *work)
blk_rq_map_sg(req->q, req, pdu->usgl.sg); blk_rq_map_sg(req->q, req, pdu->usgl.sg);
ret = ubiblock_read(pdu); ret = ubiblock_read(pdu);
rq_flush_dcache_pages(req);
blk_mq_end_request(req, ret); blk_mq_end_request(req, ret);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册