Re: block: allow early return of -EOPNOTSUPP from blkdev_issue_discard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 04, 2016 at 11:20:38AM -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.

Let's take a step back and define at what point ENOTSUPP should be
ignored, and until when it should not.  Once we have a good answer
to that question I'd be happy with updating the kernel.

Are you / dm fine with always returning ENOTSUPP?
--
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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux