help on buffer cache
Hi all,
I need to use buffer cache function in my program, I needlinux/fs.h header file in the program. Can any one help me how to compile the program in order to use the functions declared in linux/fs.h.
TO be very clear, I need function sb_bread to be executed in my
program, the program is in user space. My Q is can I use this fuctions as noraml header file functions? If yes then, is there any specific way of compiling it. I get a error message undefined reference to the function.
Please help to debug this as soon as possible.....
vadiraj
DeepRootLinux Ltd
___________________________________________________
Catering meets Camera; Tanya Weds Sahil. Rediff Matchmaker strikes another interesting match Visit http://matchmaker.rediff.com?1
Quoted 10 lines · vadiraj c s
I need to use buffer cache function in my program, I need
linux/fs.hheader file in the program. Can any one help me how to compile the program in order to use the functions declared inlinux/fs.h.TO be very clear, I need function
sb_breadto be executed in my
program, the program is in user space. My Q is can I use this fuctions as noraml header file functions? If yes then, is there any specific way of compiling it. I get a error message undefined reference to the function.
I'm not sure why you think you need to do this. Just open the block device (/dev/sda, for example) and use read(). The page/buffer caches will be used by the kernel on your behalf.
There is no way for you to access the buffer cache directly from userspace.
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk