Commit 646ce630 authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] hostfs: uml: add some other pagecache methods

This is a follow-up to my previous "hostfs - uml: set .sendfile to
generic_file_sendfile" patch. I was asking whether other methods should have
been added, and comparing with ext3 I found some more ones.

However, I have not specific clues about them: I know they use the pagecache,
which relies on *page methods, which are defined by hostfs. So I think it
could work.

I have a doubt, whether hostfs needs the commented out method below:

static struct address_space_operations hostfs_aops = {
	.writepage 	= hostfs_writepage,
	.readpage	= hostfs_readpage,
/* 	.set_page_dirty = __set_page_dirty_nobuffers, */
	.prepare_write	= hostfs_prepare_write,
	.commit_write	= hostfs_commit_write
};

Hostfs does not have a underlying device (and I have some rough idea that
buffers cache block devices data), so I wonder if that is needed or not.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 33a74a9e
...@@ -394,6 +394,10 @@ static struct file_operations hostfs_file_fops = { ...@@ -394,6 +394,10 @@ static struct file_operations hostfs_file_fops = {
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
.read = generic_file_read, .read = generic_file_read,
.sendfile = generic_file_sendfile, .sendfile = generic_file_sendfile,
.aio_read = generic_file_aio_read,
.aio_write = generic_file_aio_write,
.readv = generic_file_readv,
.writev = generic_file_writev,
.write = generic_file_write, .write = generic_file_write,
.mmap = generic_file_mmap, .mmap = generic_file_mmap,
.open = hostfs_file_open, .open = hostfs_file_open,
...@@ -402,6 +406,7 @@ static struct file_operations hostfs_file_fops = { ...@@ -402,6 +406,7 @@ static struct file_operations hostfs_file_fops = {
}; };
static struct file_operations hostfs_dir_fops = { static struct file_operations hostfs_dir_fops = {
.llseek = generic_file_llseek,
.readdir = hostfs_readdir, .readdir = hostfs_readdir,
.read = generic_read_dir, .read = generic_read_dir,
}; };
......
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