On Wed, May 04 2016 at 11:11am -0400, Christoph Hellwig <hch@xxxxxx> wrote: > On Tue, May 03, 2016 at 08:38:03PM -0400, Mike Snitzer wrote: > > Commit 38f25255330 ("block: add __blkdev_issue_discard") incorrectly > > disallowed the return of -EOPNOTSUPP if the device didn't support > > discard (or secure discard). > > I assume dm relied in this? The different handling of early vs > late -EOPNOTSUPP is the old code is rather odd, so when restoring > it I'd rather have a comment explaining why the different handling > is needed. It isn't needed by DM. The device-mapper-test-suite's thinp discard tests did catch the change in behaviour but that is besides the point. Why do you feel it makes sense to mask the fact that discards issued to a device that doesn't support them is unsupported? Especially when it is established behavior of the blkdev_issue_discard() interface to do so. I see no point in breaking established behaviour. If you do then please explain. -- 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