I’m shopping for a new NVMe SSD drive for my laptop and with the second deciding factor being Linux compatibility, I’d looked up the names of specific drives in the source code of Linux and discovered that their controllers have quirks that have to be worked around.
Now, I figured out more or less how quirks affecting one of the controllers impact its functionality under Linux, but there’s another controller that I have a trouble understanding how disabling the aforementioned command limits the functionality of, if at all; therefore I’d like to ask you all, under what circumstances is the command used by a host and can disabling it lower the performance or power efficiency of an impacted controller/drive?
To be clear, the quirk workaround I’m talking a about is NVME_QUIRK_DISABLE_WRITE_ZEROES
.
Isn’t that referring to the write zeros ata command to erase the whole drive?
No, it is referring to the NVMe write zeroes command that is used to set a range of blocks to zero. It seems like it is related to deallocate/TRIM functionality but I can only find documentation about the command without a good definition of why it would be used.
Some drives say they support it but don’t really, or it negatively affects performance, so they have quirks.
What if you try to wipe a NVME-drive for which this quirk is enabled by default in the kernel? Does that mean that even if you used something like the ‘erase device’ function in GNOME Disks on said drive, it would in fact not actually completely zero the drive? What if you use GNOME Disks to wipe a partition on said drive?
Or does this quirk refer to an entirely different operation?
Different feature. NVMe drives include a format command that can zero the drive or do a more in depth erasure, newer drives also have the sanitize option. I think this command just lets the system send a bunch of zeroes instead of having to send each one individually.
Thanks for the answer! So do I assume correctly then that things like using the ‘overwrite data’-option when running BleachBit, or wiping/erasing partitions or disks with zeroes in GNOME Disks or GParted actually does zero the data like normal, even if the quirk is enabled?
It depends how those tools are working at a lower level. Usually it is better to use a security erase feature in the drive itself, or the NVMe format command. Every drive has some sort of implementation.
SSDs have a lot of tricks to increase performance and longevity, things like wear leveling or not actually writing all those zeroes to the NAND, so writing all zeroes may leave a lot of data untouched on the actual drive while the firmware keeps a tally.