Commit ce72750f authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Richard Weinberger

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: default avatarSjoerd Simons <sjoerd@collabora.com>
Reviewed-by: default avatarChristopher Obbard <chris.obbard@collabora.com>
Tested-by: default avatarRitesh Raj Sarraf <ritesh@collabora.com>
Acked-By: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 9b0da3f2
......@@ -924,6 +924,9 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
sb->s_op = &hostfs_sbops;
sb->s_d_op = &simple_dentry_operations;
sb->s_maxbytes = MAX_LFS_FILESIZE;
err = super_setup_bdi(sb);
if (err)
goto out;
/* NULL is printed as '(null)' by printf(): avoid that. */
if (req_root == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment