1. 03 Feb, 2010 2 commits
    • Tao Ma's avatar
      ocfs2: Only bug out when page size is larger than cluster size. · 0a1ea437
      Tao Ma authored
      In CoW, we have to make sure that the page is already written
      out to the disk. So we have a BUG_ON(PageDirty(page)).
      
      In ppc platform we have pagesize=64K, so if the cs=4K, if the
      file have fragmented clusters, we will map the page many times.
      See this file as an example.
      Tree Depth: 0   Count: 19   Next Free Rec: 14
      	## Offset        Clusters       Block#          Flags
      	0  0             4              2164864         0x2 Refcounted
      	1  4             2              9302792         0x2 Refcounted
      ...
      
      We have to replace the extent recs one by one, so the page with index 0
      will be mapped and dirtied twice.
      
      I'd like to leave the BUG_ON there while adding a check so that in
      case we meet with an error in other platforms, we can find it easily.
      Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
      Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
      0a1ea437
    • Tao Ma's avatar
      ocfs2: Fix memory overflow in cow_by_page. · d622b89a
      Tao Ma authored
      In ocfs2_duplicate_clusters_by_page, we calculate map_end
      by shifting page_index. But actually in case we meet with
      a large offset(say in a i686 box, poff_t is only 32 bits
      and page_index=2056240), we will overflow. So change the
      type of page_index to loff_t.
      Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
      Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
      d622b89a
  2. 26 Jan, 2010 5 commits
  3. 11 Jan, 2010 33 commits