title: unsigned long vm_pgoff in vm_area_struct
body: <p>I was reading the memory management chapter of Linux Device drivers and i came accross the <strong>vm_area_struct</strong> .The structure has an offfset field namely  <strong>unsigned long vm_pgoff</strong>  . </p>
  
  <p>I checked the comment for the member as  <code>/* Offset (within vm_file) in PAGE_SIZE units, *not* PAGE_CACHE_SIZE */</code> . I'm not quite sure whether it is  the offset within the vma region or the offset in side the memory mapped file .</p>
  
  <p>And i have seen driver's mmap implementation code to have the following line  to  recalculate the offset again by shifting the member by the <strong>PAGE_SHIFT</strong> bits .</p>
  
  <pre><code>unsigned long off = vma-&gt;vm_pgoff &lt;&lt; PAGE_SHIFT;
  </code></pre>
  
  <p>I'm not able to understand the same and any help on this would be great .</p>