aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorJie Liu <[email protected]>2013-11-20 16:08:53 +0800
committerBen Myers <[email protected]>2013-12-04 15:42:52 -0600
commitf9fd0135610084abef6867d984e9951c3099950d (patch)
tree79015c1a36eececfe2e398ed11ab5ca742bf0ffe /lib/mpi/mpi-bit.c
parent10f73d27c8e977fb6fbd6058517069be830c6c9a (diff)
xfs: don't perform discard if the given range length is less than block size
For discard operation, we should return EINVAL if the given range length is less than a block size, otherwise it will go through the file system to discard data blocks as the end range might be evaluated to -1, e.g, # fstrim -v -o 0 -l 100 /xfs7 /xfs7: 9811378176 bytes were trimmed This issue can be triggered via xfstests/generic/288. Also, it seems to get the request queue pointer via bdev_get_queue() instead of the hard code pointer dereference is not a bad thing. Signed-off-by: Jie Liu <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ben Myers <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions