]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Only bug out when page size is larger than cluster size.
authorTao Ma <tao.ma@oracle.com>
Mon, 1 Feb 2010 09:05:33 +0000 (17:05 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 3 Feb 2010 02:15:35 +0000 (18:15 -0800)
commit5a23237c57c36bc92d6c2933a244237120030150
treee3b176e8d592e30aa9bd981ba58e1d625fc16f27
parent5d4183b3518604482e46efcf2e7fe4f050a904c0
ocfs2: Only bug out when page size is larger than cluster size.

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: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/refcounttree.c