summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
authorJie Liu2013-11-20 09:08:53 +0100
committerBen Myers2013-12-10 17:00:33 +0100
commit2f42d612e7d4c4fb1819ea7b2b6e18938714ae7a (patch)
tree4c09011b252a333c6fbaa17d00737a2605a53409 /fs/xfs/xfs_fsops.c
parentxfs: underflow bug in xfs_attrlist_by_handle() (diff)
downloadkernel-qcow2-linux-2f42d612e7d4c4fb1819ea7b2b6e18938714ae7a.tar.gz
kernel-qcow2-linux-2f42d612e7d4c4fb1819ea7b2b6e18938714ae7a.tar.xz
kernel-qcow2-linux-2f42d612e7d4c4fb1819ea7b2b6e18938714ae7a.zip
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 <jeff.liu@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com> (cherry picked from commit f9fd0135610084abef6867d984e9951c3099950d)
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
0 files changed, 0 insertions, 0 deletions