pblm getting size of files during fetching to page cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

For past  few days i have been working in the kernel page cache
datastructures for some optimizations....and while using them i
came across the necessity to have the size of those files which are
put in cache. I thought it would be easy, for from 'address_space'
datastructure i could access 'inode' and then 'i_size'.

but the PROBLEM is that while accessing this field during the fetching
of any file to page cache this field value starts from 0 and goes on
increasing.. (as a matter inc by multiple of page size) . why is it so??
i thought we could get a file size from the field i_size...

So my question is ..is there any way to get file size of any file during
kernel booting....and also if possible can any one explain the above
behaviour???

-- 
Regards
anoop.

Happiness is when what you think, 
what you say, and what you do are
in harmony --MG.
--- Begin Message ---
hi everyone

For past  few days i have been working in the kernel page cache
datastructures just for some optimizations....and while using them i
came across a necessity to have have the size of those files which are
put into cache. i thought it would be easy, for from 'address_space'
datastructure i could access 'inode' and then 'i_size'.

but the PROBLEM is that while accessing this field during the fetching
of any file to page cache this field value starts from 0 and goes on
increasing.. (as a matter multiple of page size) . why is it so??
i thought we could get a file size from the field i_size...

So my question is ..is there any way to get file size of any file during
kernel booting....and also if possible can any one explain the above
behaviour???

with regards
ajc  
-- 
Happiness is when what you think, what you say, and what you do are in
harmony

--- End Message ---

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux