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

Richard Nienhuis (nienhuir@concentric.net)
Fri, 28 Apr 2000 16:28:23 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0038_01BFB12E.C592AFC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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. =20

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

------=_NextPart_000_0038_01BFB12E.C592AFC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I don't think the kernel already has this, what = I want is=20 a way to redirect where processes can open files.  What it should = do is=20 when process (A) tries to open a file for R+W access, the kernel should=20 intercept that and notify process (B).  Process (B) then makes a = temporary=20 file and gives the kernel a handle to it.  Process (A) then does = whatever=20 it wants to the file it was given.  Once Process (A) closes the = file,=20 Process (B) then grabs the file and finds the diff between the temp file = and the=20 original.  Afterwhich Process (B) performs some magic and rewrites = the=20 original file. 
 
One big additional thing it needs is the ability = to do=20 this to spicific files.  My biggest fear is that the kernel would = then have=20 to walk through a list of files evertime one is opened.  I really = can't=20 think of a good solution for this off the top of my head and my gut = tells me=20 this would not be a good solution.  Anyone have a better = idea?
 
        =    =20             =    =20             =    =20             =    =20             =    =20             =    =20             =    =20         -Rich N
nienhuir@concentric.net
------=_NextPart_000_0038_01BFB12E.C592AFC0-- - 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/