--- initial
+++ final
@@ -1,126 +1,126 @@
 void ras_update(struct ll_sb_info *sbi, struct inode *inode, struct ll_readahead_state *ras, unsigned long index, unsigned hit) {
   struct ll_ra_info *ra = &sbi->ll_ra_info;
   int zero = 0, stride_detect = 0, ra_miss = 0;
   spin_lock(&ras->ras_lock);
   ll_ra_stats_inc_sbi(sbi, hit ? RA_STAT_HIT : RA_STAT_MISS);
   /* reset the read-ahead window in two cases.  First when the app seeks
    * or reads to some other part of the file.  Secondly if we get a
    * read-ahead miss that we think we've previously issued.  This can
    * be a symptom of there being so many read-ahead pages that the VM is
    * reclaiming it before we get to it.
    */
   if (!index_in_window(index, ras->ras_last_readpage, 8, 8)) {
     zero = 1;
     ll_ra_stats_inc_sbi(sbi, RA_STAT_DISTANT_READPAGE);
   } else if (!hit && ras->ras_window_len && index < ras->ras_next_readahead && index_in_window(index, ras->ras_window_start, 0, ras->ras_window_len)) {
     ra_miss = 1;
     ll_ra_stats_inc_sbi(sbi, RA_STAT_MISS_IN_WINDOW);
   }
   /* On the second access to a file smaller than the tunable
    * ra_max_read_ahead_whole_pages trigger RA on all pages in the
    * file up to ra_max_pages_per_file.  This is simply a best effort
    * and only occurs once per open file.  Normal RA behavior is reverted
    * to for subsequent IO.  The mmap case does not increment
    * ras_requests and thus can never trigger this behavior.
    */
   if (ras->ras_requests == 2 && !ras->ras_request_index) {
     __u64 kms_pages;
-    kms_pages = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
+    kms_pages = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
     CDEBUG(D_READA, "kmsp %llu mwp %lu mp %lu\n", kms_pages, ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages_per_file);
     if (kms_pages && kms_pages <= ra->ra_max_read_ahead_whole_pages) {
       ras->ras_window_start = 0;
       ras->ras_last_readpage = 0;
       ras->ras_next_readahead = 0;
       ras->ras_window_len = min(ra->ra_max_pages_per_file, ra->ra_max_read_ahead_whole_pages);
       goto out_unlock;
     }
   }
   if (zero) {
     /* check whether it is in stride I/O mode*/
     if (!index_in_stride_window(ras, index)) {
       if (ras->ras_consecutive_stride_requests == 0 && ras->ras_request_index == 0) {
         ras_update_stride_detector(ras, index);
         ras->ras_consecutive_stride_requests++;
       } else {
         ras_stride_reset(ras);
       }
       ras_reset(inode, ras, index);
       ras->ras_consecutive_pages++;
       goto out_unlock;
     } else {
       ras->ras_consecutive_pages = 0;
       ras->ras_consecutive_requests = 0;
       if (++ras->ras_consecutive_stride_requests > 1) stride_detect = 1;
       RAS_CDEBUG(ras);
     }
   } else {
     if (ra_miss) {
       if (index_in_stride_window(ras, index) && stride_io_mode(ras)) {
         /*If stride-RA hit cache miss, the stride dector
          *will not be reset to avoid the overhead of
          *redetecting read-ahead mode
          */
         if (index != ras->ras_last_readpage + 1) ras->ras_consecutive_pages = 0;
         ras_reset(inode, ras, index);
         RAS_CDEBUG(ras);
       } else {
         /* Reset both stride window and normal RA
          * window
          */
         ras_reset(inode, ras, index);
         ras->ras_consecutive_pages++;
         ras_stride_reset(ras);
         goto out_unlock;
       }
     } else if (stride_io_mode(ras)) {
       /* If this is contiguous read but in stride I/O mode
        * currently, check whether stride step still is valid,
        * if invalid, it will reset the stride ra window
        */
       if (!index_in_stride_window(ras, index)) {
         /* Shrink stride read-ahead window to be zero */
         ras_stride_reset(ras);
         ras->ras_window_len = 0;
         ras->ras_next_readahead = index;
       }
     }
   }
   ras->ras_consecutive_pages++;
   ras->ras_last_readpage = index;
   ras_set_start(inode, ras, index);
   if (stride_io_mode(ras))
     /* Since stride readahead is sensitive to the offset
      * of read-ahead, so we use original offset here,
      * instead of ras_window_start, which is RPC aligned
      */
     ras->ras_next_readahead = max(index, ras->ras_next_readahead);
   else
     ras->ras_next_readahead = max(ras->ras_window_start, ras->ras_next_readahead);
   RAS_CDEBUG(ras);
   /* Trigger RA in the mmap case where ras_consecutive_requests
    * is not incremented and thus can't be used to trigger RA
    */
   if (!ras->ras_window_len && ras->ras_consecutive_pages == 4) {
     ras->ras_window_len = RAS_INCREASE_STEP(inode);
     goto out_unlock;
   }
   /* Initially reset the stride window offset to next_readahead*/
   if (ras->ras_consecutive_stride_requests == 2 && stride_detect) {
     /**
      * Once stride IO mode is detected, next_readahead should be
      * reset to make sure next_readahead > stride offset
      */
     ras->ras_next_readahead = max(index, ras->ras_next_readahead);
     ras->ras_stride_offset = index;
     ras->ras_window_len = RAS_INCREASE_STEP(inode);
   }
   /* The initial ras_window_len is set to the request size.  To avoid
    * uselessly reading and discarding pages for random IO the window is
    * only increased once per consecutive request received. */
   if ((ras->ras_consecutive_requests > 1 || stride_detect) && !ras->ras_request_index) ras_increase_window(inode, ras, ra);
 out_unlock:
   RAS_CDEBUG(ras);
   ras->ras_request_index++;
   spin_unlock(&ras->ras_lock);
   return;
 }<sep>@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE