Update funmap support

This commit is contained in:
Jeremy Soller
2019-04-06 20:13:55 -06:00
parent 4329aa4366
commit f36506613b
5 changed files with 110 additions and 55 deletions
+6 -1
View File
@@ -19,7 +19,7 @@ pub struct Grant {
flags: EntryFlags,
mapped: bool,
//TODO: This is probably a very heavy way to keep track of fmap'd files, perhaps move to the context?
desc_opt: Option<FileDescriptor>,
pub desc_opt: Option<FileDescriptor>,
}
impl Grant {
@@ -133,6 +133,11 @@ impl Grant {
flush_all.flush(&mut active_table);
if let Some(desc) = self.desc_opt.take() {
//TODO: This imposes a large cost on unmapping, but that cost cannot be avoided without modifying fmap and funmap
let _ = desc.close();
}
self.mapped = false;
}