OK, I found the ZFS 1 Tb bug. I'm cross posting this to sfwvn-discuss
and net-snmp-coders for the widest possible distribution.

As you noticed earlier
7387d8a3), it has to do with statvfs.

If we compile without LARGEFILE support, it (as I suspected) is the
wrong datatype and it rolls over into negative numbers.

If we do compile with LARGEFILE support, we run into trouble with
swapctl. When I google on that problem, I find myself (one of my many
aliases) complaining about it in vain.

I'm not the only having trouble.

Looks like the kde folks may have found a workaround,


but it looks like all they're doing is faking out the linker. I propose
pretty much the same thing here

Please, please don't tell me I have to rewrite swapctl.

I don't think it's going to do any good anyway, because we have the
secondary issue of ZFS not reporting the size correctly due to other
issues. As you note;

"The design of ZFS filesystems is such that it doesnot have fixed
hrStorageAllocationUnits, so the size calculation leads to wrong
ZFS has it own routines to get the filesystem stats. "

However, I haven't been able to find those routines.

I've been through the source tour here:


but haven't found any sort of API which would report filesystem stats
unless I'm missing something really obvious.

Eric Schrock has noted;

"See zfs_prop_get() as well as zfs_get_user_props(). Of course, these
functions are subject to change without notice, but I assume you know
that already ;-)"

No, I didn't and I need a stable API.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Net-snmp-coders mailing list