diff options
author | Brian Foster <bfoster@redhat.com> | 2014-08-04 11:35:35 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-08-04 11:35:35 +1000 |
commit | eedf32bfcace7d8e20cc66757d74fc68f3439ff7 (patch) | |
tree | e6e719201cbdb4b2ce72cc6d93e06fe14c604b07 /fs/nls/nls_iso8859-13.c | |
parent | 2451337dd043901b5270b7586942abe564443e3d (diff) | |
download | op-kernel-dev-eedf32bfcace7d8e20cc66757d74fc68f3439ff7.zip op-kernel-dev-eedf32bfcace7d8e20cc66757d74fc68f3439ff7.tar.gz |
xfs: fix rounding error of fiemap length parameter
The offset and length parameters are converted from bytes to basic
blocks by xfs_vn_fiemap(). The BTOBB() converter rounds the value up to
the nearest basic block. This leads to unexpected behavior when
unaligned offsets are provided to FIEMAP.
Fix the conversions of byte values to block values to cover the provided
offsets. Round down the start offset to the nearest basic block.
Calculate the end offset based on the provided values, round up and
calculate length based on the start block offset.
Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/nls/nls_iso8859-13.c')
0 files changed, 0 insertions, 0 deletions