Page MenuHomeFreeBSD

loader: rewrite zfs reader zap code to use malloc
ClosedPublic

Authored by tsoome on Jan 30 2020, 8:33 PM.
Tags
None
Referenced Files
F135637516: D23433.id67764.diff
Tue, Nov 11, 12:17 PM
Unknown Object (File)
Sun, Nov 2, 3:27 AM
Unknown Object (File)
Fri, Oct 31, 8:32 AM
Unknown Object (File)
Thu, Oct 30, 12:06 AM
Unknown Object (File)
Fri, Oct 24, 3:12 PM
Unknown Object (File)
Tue, Oct 21, 10:37 PM
Unknown Object (File)
Tue, Oct 21, 10:54 AM
Unknown Object (File)
Mon, Oct 20, 11:16 PM
Subscribers

Details

Summary

First step on removing zfs_alloc.

Test Plan

I have used this implementation since 21 Nov 2019.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

replace if chain by switch. Print out entire zap_block_type.

LGTM. There are a few minor nits but these are optional.

stand/libsa/zfs/zfsimpl.c
2458 ↗(On Diff #67556)

Nit, optional: 'lp' is passed and from an on-stack variable, we could use it directly, e.g. *lp = malloc(sizeof(**lp)) below.

2609 ↗(On Diff #67556)

Nit, optional: I think it's better to have something like zap_leaf_free() that free's zl->l_phys and zl.

This revision is now accepted and ready to land.Feb 3 2020, 2:49 AM

Suggestions from delphij, thanks!

This revision now requires review to proceed.Feb 3 2020, 5:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2020, 7:38 AM
This revision was automatically updated to reflect the committed changes.