]> git.hungrycats.org Git - linux/commit
[PATCH] Fix reading the last block on a bdev
authorAndrew Morton <akpm@osdl.org>
Fri, 12 Mar 2004 00:18:23 +0000 (16:18 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 12 Mar 2004 00:18:23 +0000 (16:18 -0800)
commitf8ccec6c8e85a19bc0acac7e42af8c924b900703
treeccfb0b7edc42c346ebaba5ce3c91f97de9386e9f
parent6def6a58d5fed5e146b4c8704b5df12bb1184a1a
[PATCH] Fix reading the last block on a bdev

From: Chris Mason <mason@suse.com>

This patch fixes a problem we're hitting on ia64 with page sizes > 4k.

When the page size is greater than the block size, and parts of the page
fall past the end of the device, readpage will fail because
blkdev_get_block returns -EIO for blocks past i_size.

The attached patch changes blkdev_get_block to return holes when reading
past the end of the device, which allows us to read that last valid 4k
block and then fill the rest of the page with zeros.  Writes will still
fail with -EIO.
fs/block_dev.c