Re: [PATCH] rsxx: fix discard with length smaller than hw blksize

2014-06-30 Thread Jens Axboe
On 2014-06-30 11:31, Thadeu Lima de Souza Cascardo wrote: When the discard length is not a multiple of RSXX_HW_BLK_SIZE, the discard code will get into an infinite loop, even discarding data it is not supposed to. This will also hang the system. This can be reproduced by doing an ioctl BLKDISCAR

[PATCH] rsxx: fix discard with length smaller than hw blksize

2014-06-30 Thread Thadeu Lima de Souza Cascardo
When the discard length is not a multiple of RSXX_HW_BLK_SIZE, the discard code will get into an infinite loop, even discarding data it is not supposed to. This will also hang the system. This can be reproduced by doing an ioctl BLKDISCARD to /dev/rsxx0 with range from 0 to 1024. Signed-off-by: T