On Wed, Apr 13, 2016 at 08:22:12AM -0700, Bart Van Assche wrote: > That's an excellent question. Let's take a step back and look at the > functionality that is exposed to user space. What should the behavior of > the BLKDISCARD and BLKSECDISCARD ioctls be if the start and/or end sectors > are not aligned? My patch ensures that these ioctls do something meaningful > if the start and/or end sector are not aligned on a discard boundary. Is > that the behavior we want or should rather we make these ioctls fail if the > start and/or end sectors are not aligned? BLKDISCARD should just skip these ranges. You'll need to use BLKZEROOUT or the falloc support from Darrick if you actually want zeroes. BLKSECDISCARD implies it should fully erase data by the name, for which zeroing might actually not be enough. I'd be tempted to fail it, but would like to see input from the people who created it and/or are using it. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html