On Mon, Jun 24, 2002 at 09:42:43PM +0400 Maxim S. Shatskih (xxxxx@storagecraft.com) wrote:
} Subject: [ntfsd] UNIX-style filesystems and Cache Manager
basically, Maxim points out that for ext2 and other UNIX file systems,
meta-data is scattered all over the disk (volume). if you want to use
the NT cache to cache this information in a straight forward fashion,
then you need to map the whole volume into the cache, which will
probably consume a lot space for page tables (and will also consume a
lot of virtual memory, which is in short supply in the NT cache).
this might also create aliasing problems, unless you are careful about
invalidating cached pages (as file system blocks transition between
use for meta-data and use for file data).
also your file system block size has to be >= memory manager cache
size, or you’ll have a different kind of aliasing problem (although
that can be worked around with some additional complexity).
and, there are likely issues with ordering of i/o operations since some
unix file system types maintain a degree of consistentcy by updating
meta-data in a specific order to avoid consistentcy problems (for
example, an indirect block is initialized before a pointer to the
indirect block is put in the inode).
i think the best solution is: implement a buffer cache in NT and cache
your meta-data there. that’s what we did for the vxfs port to NT
(never released), and it was for the above reasons (except for the
virtual memory issue, which we didn’t think of).
it might be possible to cache the meta-data by treating it as a series
of private files in the cache. for example, the first level indirect
blocks would be one data stream associated with a file, the second
level indirect blocks another, and so on. reads and writes of the top
level indirect block (third level) would occur to a block specified in
the inode (and the indirection handled in the page-in/page-out
routines).
reads and writes of the second level of indirect blocks would use block
addresses cached in the top level indirect block entry. so
page-in/page-out for the data stream mapping the second level indirect
blocks would need to access the cache entries for the third level
indirect block data stream, and so on.
i don’t know if the NT cache manager can support that kind of recursion
or not …
cheers,
craig.
P.S. on those flavors of UNIX with a page cache used for meta-data
(such as UFS as solaris), the design of the cache is different from
NT so that the issues with virtual memory consumption and page
table space don’t exist. the cached pages are associated with a
virtual address only when required.
} UNIX-style filesystems like ext2 use the indirection blocks for
} file mappings.
} Indirection blocks are metadata blocks, not a part of some file’s
} stream, and can be scattered over the whole volume.
}
} How can such FS be implemented on NT with Cc? To cache these
} blocks, one will need a virtual volume file of the size of the whole
} disk. Is it OK? Will it not impose large memory load for cache page
} tables?
}
} What is the suggested way of doing this?
}
} Max
}
}
}
} —
} You are currently subscribed to ntfsd as: xxxxx@veritas.com
} To unsubscribe send a blank email to %%email.unsub%%
–
{apple,amdahl}!veritas!craig xxxxx@veritas.com
(415) 668-3564 (h) (650) 527-8520 (w)