Skip to contentSkip to conversation

triggering do_writepages

DISCUSSION Kapish K 3 participants 3 messages Nov 19, 2002 – Nov 20, 2002 VFS

lore
Share & tools
lore

Kapish K

author
#0 lore raw

Hello,
I have a ( possibly simple ) question on
how to trigger a do-writepages to get called, for a particular filesystem, on which I am issuing write calls. Any code that I put into the generic_file_write code ( around prepare_write or commit_write ) gets triggered when a write is issues, but I don't seem to be getting do_writepages invoked for that filesystem ( when I check the sb pointer for my particular filesystem ). Am I missing something basic in here? Any pointers will be most helpful Thanks in advance

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

#1 lore raw

Hi,
writepage is used when ever there is pressure for memory from VM system
and for mmaped files. I guess writepage need not be triggered explictly. If you want to add a functionaly for a writepage you can stack it at writepage, which will be called implicitly

----- Original Message -----
From: "Kapish K" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 19, 2002 12:29 PM
Subject: triggering do_writepages

Quoted 16 lines

Hello,
I have a ( possibly simple ) question on
how to trigger a do-writepages to get called, for a particular filesystem, on which I am issuing write calls. Any code that I put into the generic_file_write code ( around prepare_write or commit_write ) gets triggered when a write is issues, but I don't seem to be getting do_writepages invoked for that filesystem ( when I check the sb pointer for my particular filesystem ). Am I missing something basic in here? Any pointers will be most helpful Thanks in advance

Quoted 6 lines

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"

in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to Kapish K
Quoted 15 lines · Kapish K

Hello,
I have a ( possibly simple ) question on
how to trigger a do-writepages to get called, for a particular filesystem, on which I am issuing write calls. Any code that I put into the generic_file_write code ( around prepare_write or commit_write ) gets triggered when a write is issues, but I don't seem to be getting do_writepages invoked for that filesystem ( when I check the sb pointer for my particular filesystem ). Am I missing something basic in here? Any pointers will be most helpful Thanks in advance

... i can't find any do_writepages symbol...
Anyway, what is supposed to happen is, that in commit write you either start the IO (and thus the write is done), or you mark the page dirty (using set_page_dirty). Later, either when kernel needs to reuse the page (during memory allocation), or when it decides the page is dirty too long (in kflushd), it calls the writepage address_space method on the page. This method must then start the IO (and setup a callback to unlock it when IO completes and finish). If the IO completes OK, the callback should set the page clean again so kernel can reuse it.

-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <[email protected]>