Skip to contentSkip to conversation

Diff b/w generic_file_read & do_sync_read

DISCUSSION UZAIR LAKHANI 2 participants 2 messages Aug 23, 2006 VFS

lore
Share & tools
lore
#0 lore raw

Hello All,

I want to find out the difference between generic_file_read and do_sync_read. The thing I have got upto now is that generic_file_read uses the page cache for doing read therefore we must implement readpage function with generic_file_read.

On the other hand do_sync_read uses aio_read function for doing read. I want a little bit explanation about the difference b/w these two.

Thanks,
Uzair Lakhani,
Karachi, Pakistan.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 11 lines · UZAIR LAKHANI

Hello All,

I want to find out the difference between generic_file_read and do_sync_read. The thing I have got upto now is that generic_file_read uses the page cache for doing read therefore we must implement readpage function with generic_file_read.

On the other hand do_sync_read uses aio_read function for doing read. I want a little bit explanation about the difference b/w these two.

There really isn't too much difference between the two. There is a set of patches in the -mm kernel that cleans up some of the duplicity and removes generic_file_read completely:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115214448319794&w=2

Shaggy

Signature · 2 lines
David Kleikamp
IBM Linux Technology Center