aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-01-17 15:31:35 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-04-26 18:01:31 -0400
commit363041a5f74b953ab6b705ac9c88e5eda218a24b (patch)
treec0661c3f88978f2049693682f1cb94b20a8454c0 /fs/ocfs2/aops.c
parentdcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8 (diff)
ocfs2: temporarily remove extent map caching
The code in extent_map.c is not prepared to deal with a subtree being rotated between lookups. This can happen when filling holes in sparse files. Instead of a lengthy patch to update the code (which would likely lose the benefit of caching subtree roots), we remove most of the algorithms and implement a simple path based lookup. A less ambitious extent caching scheme will be added in a later patch. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 875c11443817..f3b0cc5cba1a 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -158,8 +158,7 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
158 if (err) 158 if (err)
159 goto bail; 159 goto bail;
160 160
161 err = ocfs2_extent_map_get_blocks(inode, iblock, 1, &p_blkno, 161 err = ocfs2_extent_map_get_blocks(inode, iblock, &p_blkno, NULL);
162 NULL);
163 if (err) { 162 if (err) {
164 mlog(ML_ERROR, "Error %d from get_blocks(0x%p, %llu, 1, " 163 mlog(ML_ERROR, "Error %d from get_blocks(0x%p, %llu, 1, "
165 "%llu, NULL)\n", err, inode, (unsigned long long)iblock, 164 "%llu, NULL)\n", err, inode, (unsigned long long)iblock,
@@ -499,8 +498,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)
499 down_read(&OCFS2_I(inode)->ip_alloc_sem); 498 down_read(&OCFS2_I(inode)->ip_alloc_sem);
500 } 499 }
501 500
502 err = ocfs2_extent_map_get_blocks(inode, block, 1, &p_blkno, 501 err = ocfs2_extent_map_get_blocks(inode, block, &p_blkno, NULL);
503 NULL);
504 502
505 if (!INODE_JOURNAL(inode)) { 503 if (!INODE_JOURNAL(inode)) {
506 up_read(&OCFS2_I(inode)->ip_alloc_sem); 504 up_read(&OCFS2_I(inode)->ip_alloc_sem);
@@ -574,7 +572,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock,
574 572
575 /* This figures out the size of the next contiguous block, and 573 /* This figures out the size of the next contiguous block, and
576 * our logical offset */ 574 * our logical offset */
577 ret = ocfs2_extent_map_get_blocks(inode, iblock, 1, &p_blkno, 575 ret = ocfs2_extent_map_get_blocks(inode, iblock, &p_blkno,
578 &contig_blocks); 576 &contig_blocks);
579 if (ret) { 577 if (ret) {
580 mlog(ML_ERROR, "get_blocks() failed iblock=%llu\n", 578 mlog(ML_ERROR, "get_blocks() failed iblock=%llu\n",