From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Harkes Subject: Re: which function writes to the disk Date: Wed, 5 Mar 2003 12:54:00 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030305175400.GE21465@delft.aura.cs.cmu.edu> References: <20030305072513.31413.qmail@webmail6.rediffmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kernelnewbies@nl.linux.org, linux-fsdevel@vger.kernel.org Return-path: To: Rajaram Suresh Gaunker Content-Disposition: inline In-Reply-To: <20030305072513.31413.qmail@webmail6.rediffmail.com> List-Id: linux-fsdevel.vger.kernel.org On Wed, Mar 05, 2003 at 07:25:13AM -0000, Rajaram Suresh Gaunker wrote: > which functions writes to the disk in file system? > > how can i know which user wants to write to disk, or which user > has called the system call? That is a little difficult, last time I looked, writes were just marking the memory page dirty. At some point there is this kernel flush daemon that wanders by, notices that the page is dirty and kicks off the actual IO. In the mean time several users might have written to the same page before IO has even started which makes it unclear which user has permission to write. Will all valid writes fail if one user's permissions have expired? Or will we allow an user's writes to succeed just because he is piggybacking on the valid writers. > user registers his key by using a system call which i'm > providing he can also unregister itself using a system call > > the key for each user is stored in kernel when we are writing the > data to file of user we will encrypt using owners key You might want to google for 'cryptfs', 'cfs', and 'tcfs'. Jan