LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 06-07-2009, 06:09 PM   #1
kenokanza
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Question About the last page of file reading in the user space


1. If some file's size is 5000 Bytes, then the first 4096 Bytes are read by the first page, the remaining 4 Bytes are read by the second page. What is fetched in the left 4092 Bytes in the second page space?

2. How can I check the offset of the data (eg. the remaining 4 Bytes's location)
I found there is a macro named "bio_offset", but it's parameter is bio, not page.

3. When reading files, how can I check where each page is from (the file path and the file name)
Can the file name be found through struct file->f_dentry->d_name.name?

4. in function mpage_end_io_read,
struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
so pointer bvec is pointed to the last "bio_vec",then "--bvec", and I don't why doing it reversely?

Thx a lot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write into File from Kernel and read the same file from User space saurabhchokshi Programming 0 05-01-2009 02:26 PM
Restrict cookie reading to one page jimdaworm Linux - Software 2 01-02-2009 06:05 PM
lkl user space keylogger needs keymap file foustware Linux - Software 5 10-18-2007 09:49 AM
About File System in USer Space (FUSE). Sebouh Programming 25 06-08-2007 04:53 AM


All times are GMT -5. The time now is 08:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration