diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-08-31 09:04:06 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-08-31 09:04:06 +0200 |
commit | 66073a41410ee20941bfcf298812134101a1d0c2 (patch) | |
tree | f95fdb8d578cc4b4014eafbba68bea2df18acf0e | |
parent | face3bc9f76b13385f0cbfdbf41c02a9063124bc (diff) |
loop: fastfs must invalidate past bmap() for non-page cache IOloop-fastfs
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | drivers/block/loop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 5b4b23ff9f1f..1b3abd01605a 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1752,13 +1752,11 @@ static void loop_read_bmap(struct loop_device *lo, u64 disk_start, u64 size, /* * total_size is in bytes and has been masked off to block boundaries */ - u64 total_size; u64 this_fill; mask = (1 << inode->i_blkbits) - 1; disk_end = (disk_start + size + mask) & ~mask; nr_blocks = (disk_end - (disk_start & ~mask)) >> inode->i_blkbits; - total_size = nr_blocks << inode->i_blkbits; offset_to_bmap = disk_start & ~mask; expected_block = 0; @@ -1807,6 +1805,9 @@ new_extent: } BUG_ON(total_blocks < nr_blocks); + + if (!pcache) + lo_inval_pgcache(lo, disk_start, total_blocks << inode->i_blkbits); } /* |