]> git.baikalelectronics.ru Git - kernel.git/commit
hostfs: Fix writeback of dirty pages
authorSjoerd Simons <sjoerd@collabora.com>
Fri, 5 Nov 2021 08:10:51 +0000 (09:10 +0100)
committerRichard Weinberger <richard@nod.at>
Tue, 21 Dec 2021 20:44:27 +0000 (21:44 +0100)
commitde0e266b165c8ac6c33c21e805b62f71acfd2efc
tree3ba3c76130e5f64d6280a394682a1ff69099e4ba
parenta5390a06bd0e1476263502e8a0bc7124f86b6688
hostfs: Fix writeback of dirty pages

Hostfs was not setting up the backing device information, which means it
uses the noop bdi. The noop bdi does not have the writeback capability
enabled, which in turns means  dirty pages never got written back to
storage.

In other words programs using mmap to write to files on  hostfs never
actually got their data written out...

Fix this by simply setting up the bdi with default settings as all the
required code for writeback is already in place.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Ritesh Raj Sarraf <ritesh@collabora.com>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/hostfs/hostfs_kern.c