Considering how to do that log writing:
Kernel contains several codes that are writing data to disk for
various "logging" tasks. Most promimnent example of them is:
kernel/acct.c
It keeps kernel internal file descriptor ("filp") for its
internal use. It has code that opens a file for writing
to it, actual writer (one smallish block at the time, but
that is merely size parameter issue), and it also closes
the file when wanted (e.g. under administrator control).
All that completely independent of target filesystem.
Oh, and of course it has management interface, so that
sysadmin can tell to it:
- when to activate / deactivate
- into which file to log
In your application there is a danger of snaring
yourself: disk activity must not stop at logging
something, when the log buffer is full and flushing
it is under way. Otherwise you are in danger of
halting the log-flush, and then you have a dead
machine.
> Thanks.
> Sumit
>
> p.s. I am using Kernel 2.4.20 and want this in EXT2 FS
/Matti Aarnio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/