search for: inode_blocks

Displaying 6 results from an estimated 6 matches for "inode_blocks".

2008 Sep 02
1
[PATCH] ocfs2: Fix a bug in direct IO read.
...ocfs2/aops.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 80fa3fc..f27c1cc 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -576,6 +576,14 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, inode_blocks = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode)); /* + * For a read which begins past the end of file, we return a hole. + */ + if (!create && (iblock >= inode_blocks)) { + ret = 0; + goto bail; + } + + /* * Any write past EOF is not allowed because we'd be ext...
2009 Jul 21
1
[PATCH 1/1] ocfs2: adds mlogs to aops.c -V2
...the right size, so there's no need * for us to check any of that. */ @@ -565,6 +603,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, * Any write past EOF is not allowed because we'd be extending. */ if (create && (iblock + max_blocks) > inode_blocks) { + mlog(0, "writting to EOF(%llu/%llu)\n", + iblock + max_blocks, inode_blocks); ret = -EIO; goto bail; } @@ -618,6 +658,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, contig_blocks = max_blocks; bh_result->b_size = contig_blocks...
2006 Dec 29
3
[git patches] ocfs2 fixes
...fs2/aops.c index ef6cd30..93628b0 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -540,8 +540,7 @@ static int ocfs2_direct_IO_get_blocks(st struct buffer_head *bh_result, int create) { int ret; - u64 vbo_max; /* file offset, max_blocks from iblock */ - u64 p_blkno; + u64 p_blkno, inode_blocks; int contig_blocks; unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; @@ -550,12 +549,23 @@ static int ocfs2_direct_IO_get_blocks(st * nicely aligned and of the right size, so there's no nee...
2006 May 01
1
"Guessing" superblock parameters
Hi again, I have the following scenario: I've got a partition which has exactly 14659312 blocks: $ fdisk -l /dev/hda Disk /dev/hda: 28.5 GB, 28520497152 bytes 255 heads, 63 sectors/track, 3467 cylinders Units = Zylinder of 16065 * 512 = 8225280 bytes Ger?t Boot Start End Blocks Id System (...) /dev/hda4 1643 3467 14659312+ 83 Linux (...)
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...the right size, so there's no need * for us to check any of that. */ @@ -565,6 +599,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, * Any write past EOF is not allowed because we'd be extending. */ if (create && (iblock + max_blocks) > inode_blocks) { + mlog(0, "writting to EOF(%llu/%llu)\n", + iblock + max_blocks, inode_blocks); ret = -EIO; goto bail; } @@ -618,6 +654,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, contig_blocks = max_blocks; bh_result->b_size = contig_blocks...
2009 Jul 21
1
(no subject)
...the right size, so there's no need * for us to check any of that. */ @@ -565,6 +603,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, * Any write past EOF is not allowed because we'd be extending. */ if (create && (iblock + max_blocks) > inode_blocks) { + mlog(0, "writting to EOF(%llu/%llu)\n", + iblock + max_blocks, inode_blocks); ret = -EIO; goto bail; } @@ -618,6 +658,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, contig_blocks = max_blocks; bh_result->b_size = contig_blocks...