2004-03-09 21:17:40

by Chris Mason

[permalink] [raw]
Subject: [PATCH] reading the last block on a bdev

Hello everyone,

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.

-chris


Attachments:
blkdev_get_block-partial (801.00 B)