RE: [PATCH] block: create ioctl to discard-or-zeroout a range of blocks

From
Seymour, Shane M <hidden>
Date
2015-11-12 00:56:02
Also in
linux-fsdevel, lkml
Reply to
Seymour, Shane M, 2015-11-11
which would make the other checks I suggested to ensure that neither start
or end were more than (uint64_t)LLONG_MAX unnecessary.
My apologies I was wrong about what I said above - after thinking about it for longer you still need to make sure that at least len is not greater than (uint64_t)LLONG_MAX because in the calculation:

	if (start > (uint64_t)LLONG_MAX - len)
		return -EINVAL;

if len was more than (uint64_t)LLONG_MAX it would underflow and become a very large positive number and start would never be greater than that (and I said end when I should have said len).
Thread (8 messages) 8 messages, 3 authors, last reply 2015-11-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help