Hello,
Just want to confirm that the following are the only kernel functions that
are called to write to files(VFS):
- do_sync_write
- vfs_write (calls do_sync_write)
- sys_write (calls vfs_write)
- sys_pwrite64 (calls vfs_write)
- vfs_writev
- sys_writev
- do_readv_writev
Basically, I want to find out the all kernel functions thru which every
write call (not FS dependant) passes.
Disclaimer: I am newbie.
Thanks,
Siddhartha
On Wed, 2004-06-23 at 17:05 +0530, Siddhartha Jain wrote:
quoted
Basically, I want to find out the all kernel functions thru which every
write call (not FS dependant) passes.
mmap?
I am sorry. To put it differently, if I wanted to *snoop* on all bytes
written to all/any files on the system, irrespective of the FS, what
functions would I need to modify in the kernel? The objective is to be able
to replicate directories.
Thanks,
Siddhartha
The objective is to be able to replicate directories.
There was a thread on linux-kernel about this recently.
Look for "COW files".
What you want to do is not trivial to do correctly.
mmap() and hard links both make it complicated.
Fortunately there was lots of good design in that thread, and we
figured out how to do it properly. It's just waiting for someone to
implement it properly :)
Meanwhile, a patch is already available which handles simpler cases.
-- Jamie
Thanks for the pointers Jamie.
Can someone tell me how are the functions in fs/read_write.c (do_sync_write,
vfs_write etc) related to functions like ioctl, mmap and aio_write.
In the layered structure, application -> vfs -> FS Layer -> Generic Block
device layer, what call belongs where?
Thanks,
Siddhartha
The objective is to be able to replicate directories.
There was a thread on linux-kernel about this recently.
Look for "COW files".
What you want to do is not trivial to do correctly.
mmap() and hard links both make it complicated.
Fortunately there was lots of good design in that thread, and we
figured out how to do it properly. It's just waiting for someone to
implement it properly :)
Meanwhile, a patch is already available which handles simpler cases.
-- Jamie