freenode/#mezzano - IRC Chatlog
Search
15:40:10
froggey
ok, what's your plan? is this going to be a generic layer between the current fs generic functions and the actual disk filesystem implementations?
15:42:28
ebrasca
I am thinking someting like VFS -> FAT32/EXT2/EXT3/... -> Cache -> disk/disk-file/raid/...
15:47:22
ebrasca
I am thinking on it because I think it is my best option for not neding to read full file to read some bytes.
15:50:40
froggey
linux's page cache caches the contents of files (not disk blocks directly) in page-sized (4kb) chunks
15:51:45
froggey
so to read some bytes from a file, the page cache will make sure all the required pages are in cache (calling out to the fs to read in any missing pages), then copy from those cached pages to the result buffer
15:53:41
froggey
I'm not saying that you have to cache file contents, a disk cache might be eaiser to implement, just that you don't have to cache the entire file if the cache is between the vfs & the actual filesystem
16:05:06
housel
On most modern OSs, the disk buffer cache is integrated with physical memory allocation/VM paging
16:09:42
froggey
I was thinking a new layer between the vfs & actual filesystems, but it could be part of the vfs
16:15:46
ebrasca
I think I undestand if done properly . operations is going to be implemented in new layer (like read-byte/char)
19:32:01
p_l
ebrasca: you have VFS handling "routing", then calling pagecache-based functions to load file contents (gross simplification there)
19:32:39
p_l
so, in a way, you have VFS(routing) -> filesystem driver -> VFS(pagecache) -> filesystem driver -> disk/etc
19:34:36
p_l
now, a generic share-able buffer structure that could be used by all filesystems, and a way to mark "this part of address space has this handler for providing pages"
19:35:49
p_l
ebrasca: that's when the filesystem uses the provided generic file_ops and just implements get_block_routine and inode read
19:37:40
p_l
well... I might be not the most current, but in case of Linux VFS (which you referred to) it's the filesystem's choice to use "generic operations" (though it's *heavily* pushed to use them)
19:41:06
p_l
ebrasca: in Linux, it's heavily suggested to use "generic" implementations of several things where possible
19:42:15
p_l
mount you do have to implement because the fs-side of it is how you recognize and setup the filesystem