Write calls

5 messages, 3 authors, 2004-06-24 · open the first message on its own page

Write calls

From: Siddhartha Jain <hidden>
Date: 2004-06-23 11:35:56

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

Re: Write calls

From: David Woodhouse <dwmw2@infradead.org>
Date: 2004-06-23 15:10:54

On Wed, 2004-06-23 at 17:05 +0530, Siddhartha Jain wrote:
Basically, I want to find out the all kernel functions thru which every
write call (not FS dependant) passes.
mmap?

-- 
dwmw2

RE: Write calls

From: Siddhartha Jain <hidden>
Date: 2004-06-23 15:30:58

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

Re: Write calls

From: Jamie Lokier <hidden>
Date: 2004-06-23 16:47:45

Siddhartha Jain wrote:
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

RE: Write calls

From: Siddhartha Jain <hidden>
Date: 2004-06-24 09:10:21

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

-----Original Message-----
From: linux-fsdevel-owner@vger.kernel.org
[mailto:linux-fsdevel-owner@vger.kernel.org]On Behalf Of Jamie Lokier

Siddhartha Jain wrote:
quoted
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help