From: Jeff Dike <jdike@ka...> - 2003-02-24 01:56:05
> Using struct timespec internally in hostfs seemed as the cleanest
> solution, translating it at the host border, instead of translating it
> at the kernel border.
OK, makes sense.
Nice work on cleaning up the code as you went.
Your hostfs_file_release is bogus. Even after a file is closed, and the
struct file is released, dirty inodes will remain which have to be written
out, which means that the host file must remain open until the inode is
released. There is a reason that the descriptor is in the inode and not
in file->private_data and this is it.
Why did you get rid of the call to inode_setattr. It's not called from
anywhere in vfs, so it looks like it still needs to be called from the
filesystem, which ext2, at least, does.
I wonder about having hostfs_getattr just call generic_fillattr. I can't
think of any reason we need to go out to the host for any of that stuff,
but that might need some more careful thought.
Why did you remove the dev argument from the stat_file interface?
Your fsync addition is wrong in a couple of ways. First, the semantics
you implemented are wrong. fsync has to make sure that there are no dirty
buffers or pages by writing them out. Second, it has to make sure that data
is in the backing store when it returns. For the host, this is the disk.
For a UML, this is the host page cache. So, running fsync on the host is
irrelevant. Maybe there should be an option to have hostfs fsync run fsync
on the host. That might be useful for some applications.
Get latest updates about Open Source Projects, Conferences and News.