diff options
author | Chandan Rajendra <[email protected]> | 2017-01-10 13:29:54 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2017-01-10 13:29:54 -0700 |
commit | dd545b52a3e1efd9f2c6352dbe95ccd0c53461cc (patch) | |
tree | e60b234f4d912a7d8f0e7a8f248233cd263b3e23 /net/lapb | |
parent | a121103c922847ba5010819a3f250f1f7fc84ab8 (diff) |
do_direct_IO: Use inode->i_blkbits to compute block count to be cleaned
The code currently uses sdio->blkbits to compute the number of blocks to
be cleaned. However sdio->blkbits is derived from the logical block size
of the underlying block device (Refer to the definition of
do_blockdev_direct_IO()). Due to this, generic/299 test would rarely
fail when executed on an ext4 filesystem with 64k as the block size and
when using a virtio based disk (having 512 byte as the logical block
size) inside a kvm guest.
This commit fixes the bug by using inode->i_blkbits to compute the
number of blocks to be cleaned.
Signed-off-by: Chandan Rajendra <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Fixed up by Jeff Moyer to only use/evaluate inode->i_blkbits once,
to avoid issues with block size changes with IO in flight.
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions