From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: write back caching, async writes Date: Sun, 21 Apr 2002 01:56:39 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3CC1ABD7.3040800@shaolinmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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