> Ok. Should we change diskfs_get_filemap to accept a flag that says we do > not want to create the memory object if it doesn't exist already? That > seems to be an important optimization to me if we call it in io_stat.
diskfs shouldn't be assuming anything about the filesystem's memory object ports and how to guess how many mappers there might be and so forth. Probably the easiest thing to do is just have the filesystem set these st_mode bits directly itself in dn_stat. It knows when it passes out the memory object in the first place, so it can clear S_IMMAP0 then. If it's necessary to do an active check at stat time to figure out how many mappers there might be, then this can be a new callback made by diskfs_S_io_stat. e.g., diskfs_modify_stat called just before unlocking the node. The library can provide a no-op default definition of the function so that old filesystems keep linking if they haven't been enhanced to produce the new bits. Thanks, Roland _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd