I considered simply posting the lyrics to the Pixies song to summarize where I am at the moment, but I decided to be a little more descriptive...

I've been scratching at the ZFS flows I posted a few days ago. I realized that I made a mistake by diving right into reading the Storage Pool Layer code. Doing so was mostly useless, as I am without context with regard to the specific functionality implemented therein. Rather, it makes much more sense to start reading at the start, e.g. in userland.

I've found no real documentation on what libzpool is, exactly. It doesn't have a header file, though it exists as its own subdir in lib/libzpool. I'm not even sure where it's linked from. At the moment, I'm assuming it's really a part of libzfs. In order to determine what functions are provided by libzpool, I did the following:

( cd ~/src/freebsd/contrib/opensolaris/ ; \
for c in lib/libzpool/common/*.c
do
	# For each c file in libzpool
	# - Delete all static functions
	# - Print each remaining function name preceded by the line number
	# - Then, to format the output
	#   - Collapse the line number and function name
	#   - Prepend the filename
	# This form will be easy to merge into cflow output.
	sed -e '/^static/,/^}/d' \
			-n -e '/^\([^(  ]\{1,\}\)(.*$/{=;s//\1/p;}' ${c} | \
		sed -e '/[0-9]\{1,\}/N' \
			-e 's/\n/:/' \
			-e "s,^,${c}:,"
done )
I'm really, really frustrated at the moment. I've got to get to get my head around these things, yet it continually seems that I'm fumbling around with half a clue. Plus, lacking feedback, I'm unsure whether my approach is completely off-base or not. If I can bridge the mental gap between userland and device management, I think I'll be able to get somewhere. Let's make that a reasonable goal for this weekend.
2007/06/09 10:11
THE MEATENING!! -- I strongly suggest that you do not send mail to that link.