Page MenuHomeFreeBSD

stand: Handle dynamic gang headers
ClosedPublic

Authored by markj on Tue, Nov 4, 1:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 5, 1:22 PM
Unknown Object (File)
Wed, Nov 5, 12:05 PM
Unknown Object (File)
Wed, Nov 5, 11:00 AM
Unknown Object (File)
Wed, Nov 5, 9:20 AM
Unknown Object (File)
Wed, Nov 5, 4:32 AM
Unknown Object (File)
Wed, Nov 5, 2:25 AM
Unknown Object (File)
Tue, Nov 4, 9:38 PM
Unknown Object (File)
Tue, Nov 4, 9:38 PM
Subscribers

Details

Summary

There is a pool feature, dynamic_gang_header, that is enabled by default
in new pools. When this feature is active, gang headers may be larger
than 512 bytes. The loader needs to be taught to cope with that.

Try using the vdev ashift to pick the gang block header size. If the
checksum fails, fall back to the old gang block header size.

This is based on a patch by Paul Dagnelie, with testing and a few fixups
from me.

PR: 289690

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Tue, Nov 4, 1:39 PM

So this looks good. Minor quibble over naming...

stand/libsa/zfs/zfsimpl.c
2346

impl? Ususally we've moved to calling these _flags() or similar. impl usually is for something else...

This revision is now accepted and ready to land.Tue, Nov 4, 5:54 PM
stand/libsa/zfs/zfsimpl.c
2346

That's fairly idomatic in ZFS code. There are several other examples in this file, zfs_mount_impl(), vdev_write_bootenv_impl()...

stand/libsa/zfs/zfsimpl.c
2346

Ok. The rest of the storage stack is different... but I'm happy if there's a consistency here