Good idea, or idea gone horribly wrong: Adding kernel file redirection...

From: Richard Nienhuis (nienhuir@concentric.net)
Date: Fri Apr 28 2000 - 18:28:23 EST


I don't think the kernel already has this, what I want is a way to redirect where processes can open files. What it should do is when process (A) tries to open a file for R+W access, the kernel should intercept that and notify process (B). Process (B) then makes a temporary file and gives the kernel a handle to it. Process (A) then does whatever it wants to the file it was given. Once Process (A) closes the file, Process (B) then grabs the file and finds the diff between the temp file and the original. Afterwhich Process (B) performs some magic and rewrites the original file.

One big additional thing it needs is the ability to do this to spicific files. My biggest fear is that the kernel would then have to walk through a list of files evertime one is opened. I really can't think of a good solution for this off the top of my head and my gut tells me this would not be a good solution. Anyone have a better idea?

                                                                                                                    -Rich N
nienhuir@concentric.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:16 EST