On Apr 5, 2005 6:11 PM, nitin ahuja <nitin2ahuja@xxxxxxxxxxxxx> wrote: > Hi, > > > > >> To commit a buffer's data to disk try this: > >> > >> void commit_to_disk (struct buffer_head * bh) > >> { > >> mark_buffer_dirty(bh); > >> sync_dirty_buffer(bh); > >> } > >> > > > I am using 2.4.29 atm, and I am wondering if > > "sync_dirty_buffer" is the > > equivalent of "fs/buffer.c:int sync_buffers(kdev_t > > dev, int wait)" > > > > Then just say mark_buffer_dirty(bh). > "sync_dirty_buffer()" is to sync dirty buffer to disk instantly, which otherwise, would be done by bdflush deamon at regular intervels. sync_dirty_buffer works great on non-journaling/non-data logging fs. b_data indeed pointing to the data of the files in there. Thanks for the pointer. I tried to recode it to view file data in terms of pages (which in turn, points to a collection of blocks) in page cache, instead of blocks in buffer cache, but i can't seem to work it out yet. Kathy -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/