aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-03-09 19:26:50 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-04-26 18:02:45 -0400
commit4f902c37727bbedbc0508a1477874c58ddcc9af8 (patch)
tree841b35387cfea5d2518c258c4de6ef868948369b /fs/ocfs2/aops.c
parent49cb8d2d496ce06869ccca2ab368ed6b0b5b979d (diff)
ocfs2: Fix extent lookup to return true size of holes
Initially, we had wired things to return a size '1' of holes. Cook up a small amount of code to find the next extent and calculate the number of clusters between the virtual offset and the next allocated extent. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index eb67c902b002..ff71e0b430cd 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -439,8 +439,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock,
439 struct buffer_head *bh_result, int create) 439 struct buffer_head *bh_result, int create)
440{ 440{
441 int ret; 441 int ret;
442 u64 p_blkno, inode_blocks; 442 u64 p_blkno, inode_blocks, contig_blocks;
443 int contig_blocks;
444 unsigned int ext_flags; 443 unsigned int ext_flags;
445 unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; 444 unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits;
446 unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; 445 unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits;