HAMMER2 corruption bug and fix

It’s possible to have data corrupted on a HAMMER2 volume during a specific combination of a bulkfree operation and a lot of writing to disk.  Matthew Dillon has a potential fix already.  As he announced, it’s scheduled to go into 5.4 this weekend.  It’s a rare bug, but if you want to check for it, look for CHECK FAIL entries in /var/log/messages.

And because every cloud has a silver lining: some not-yet-quantified performance improvements.

 

OverTRIMmed

Matthew Dillon recently fixed a TRIM bug, where a TRIM command was being issued unconditionally, regardless of the mount flag, and duplicating the action if it was set normally.  It’s fixed now.  This would only have any significant slowdown on UFS, which means it would only affect installworld – the rest of your mounted volumes are HAMMER, right?

Upgrade results, bonus for dragonflybsd.org

Remember the upgrade for dragonflybsd.org machines?  It completed, and it’s interesting to see that SSDs have become so easily available that “spinning rust” hard disk drives are only still useful for bulk storage, and even then probably not for much longer.

Another neat side effect: disk usage on developer system leaf.dragonflybsd.org  was cut in half, thanks to HAMMER2 dedup/compression.  It’s a ‘free’ half-terabyte.

Half billion tries for a HAMMER2 bug

I’m pulling a quote off of IRC to show some of the testing on HAMMER2, specifically as the background for this commit:

14:22 <@dillon_> ^^^ hammer2 bug, could reproduce it around once a day doing a continuous rm -rf on hardlinked snapshots. reproduced about once every 500 million directory entries or so

I am somewhat tickled by the notion that you might have a problem after deleting half a billion directory entries.