[PATCH 02/11] block: remove the unused BIP_{CTRL,DISK}_NOCHECK flags
Martin K. Petersen
martin.petersen at oracle.com
Tue Jun 11 13:02:11 PDT 2024
Christoph,
> I can just keep the flags in, they aren't really in the way of anything
> else here. That being said, if you want opt-in aren't they the wrong
> polarity anyway?
I don't particularly like the polarity. It is an artifact of the fact
that unless otherwise noted, checking will be enabled both at HBA and
storage device. So if we reverse the polarity, it would mean that sd.c,
somewhat counter-intuitively, would enable checking on a bio that has no
bip attached. Since checking is enabled by default, regardless of
whether a bip is provided, it seemed more appropriate to opt in to
disabling the checks.
I believe one of my review comments wrt. to the io_uring passthrough
series was that I'd prefer to see the userland flag have the right
polarity, though. Because at that level, explicitly enabling checking
makes more sense.
I don't really mind reversing the BIP flag polarity either. It's mostly
a historical artifact since non-DIX HBAs would snoop INQUIRY and READ
CAPACITY and transparently enable T10 PI on the wire. DIX moved that
decision to sd.c instead of being done by HBA firmware. But we'd still
want checking to be enabled by default even if no integrity was passed
down from the HBA.
--
Martin K. Petersen Oracle Linux Engineering
More information about the Linux-nvme
mailing list