Skip to contentSkip to conversation

write back caching, async writes

DISCUSSION David Chow 1 participant 1 message Apr 20, 2002 VFS

lore
Share & tools
lore

David Chow

author
#0 lore raw

If I want to implement a write back cache or async write in an fs, how can I make vfs call back to write by cache or any way to schedule some tasks so that the kernel will commit the current task but have a call back later? For filesystem methods, it seems it is a process context stuff, the only way I can think is to use mark_inode_dirty() so that vfs will call my write_inode() super_block_ops so that it works like schedule something to write later. If so, how can I retain the page cache that has already called to my commit_write() so that those clean pages (actually not in disk for async case) can be retained and I can make use of those pages when I actuallly sync the data to disk. Or should I have a private researved area of buffer to take care of those async pages? Please give suggestions. Thanks.

David