Samsung Finds, Fixes Bug In Linux Trim Code
New submitter Mokki writes: After many complaints that Samsung SSDs corrupted data when used with Linux, Samsung found out that the bug was in the Linux kernel and submitted a patch to fix it. It turns out that kernels without the final fix can corrupt data if the system is using linux md raid with raid0 or raid10 and issues trim/discard commands (either fstrim or by the filesystem itself). The vendor of the drive did not matter and the previous blacklisting of Samsung drives for broken queued trim support can be most likely lifted after further tests. According to this post the bug has been around for a long time.
When Apple updated OS X to allow TRIM on non-Apple supplied SSDs, forums were flooded with people claiming you should never use Samsung because they were fundamentally broken with regards to TRIM. Their "proof" was that corruption happened on Linux and they would not be swayed by the thought that maybe the problem was with Linux.
If you have 64GB of RAM, you can cache the entire SSD. Then you won't have to issue TRIM commands!
I take some of that back. It seems the real credit for digging in goes to these guys. Samsung came in a month ago after they were provided a test suite and then gets credit for finding the kernel code path that caused the problem. An Oracle engineer provided a more-correct patch.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Why would Linus apologize? He did not write the Samsung firmware, which says it can do queued TRIM falsely. That affects quite many users. This article is about another bug, which hardly affects anyone, maybe some cloud operators only.
So you may apologize for not seeing the difference between an elephant and an ant.
It's the fact that they put the boot in to Samsung, claiming that their TRIM implementation was broken. They then stopped looking at their own code and had to wait for Samsung to fix their bug.
const int one = 65536; (Silvermoon, Texture.cs)
SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
How is this marked Informative? TRIM is irrelevant if you only read data and the cache will still have to be flushed to SSD if you write data.
Also it's been more than five years since SSDs passed the point where 128GB had the best price per gigabyte.
I've read the articles. There are two separate bugs here. One, Samsung drives advertise support for queued TRIM even though it's not properly supported, causing corruption. Two, the kernel had a TRIM bug that affected serial TRIM with mdadm RAID, which is the kernel bug Samsung found and fixed. The queued TRIM bug still exists in the Samsung firmware.
Sorry, that's incorrect.
There's a bug on MD raid0 and raid10. In Linux.
There is a data destroyer bug in SAMSUNG NCQ TRIM firmware. Which is *blacklisted*, so that it uses the non-ncq trim.
See? You're an idiot and everyone but you actually knew what they were complaining about. The samsung firmware is buggy crap that destroys data on NCQ TRIM, and the Linux kernel had a data destroyer bug in RAID0/RAID10 + TRIM that was fixed by a samsung engineer.
The samsung firmware is still broken, the linux kernel has been fixed, and you're still an useless idiot.
The queued TRIM blacklist on Samsung drives doesn't affect Windows because Windows doesn't support queued TRIM yet. This Linux kernel bug is a different issue, but many assumed it was the same, even though Algolia clearly stated in their blog post that they weren't using queued TRIM.