ZFS quotas support
davec-b at rogers.com
Tue Dec 4 06:30:09 MST 2012
On 12/04/2012 12:53 AM, Bogdan Iamandei wrote:
> Hi all,
> I've been looking into getting something done about supporting ZFS quotas under
> Samba. I haven't found a lot on it - other than the fact that there's no quotactl()
> API for ZFS - and that's the end of it.
> What got me thinking is that "quota" command on Solaris seems to happily report
> the quota for a given user whether it's UFS or ZFS. Digging a little bit deeper
> in the OpenSolaris sources - it appears that whilst indeed there's no API for
> getting the user quota, there's a way. It's not the most elegant way but it scratches
> an itch: it uses dlopen() and dlsym().
> (see http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/ufs/quota/quota.c)
> So - three questions to the esteemed developers:
> 1). Has anyone done anything about this before I start duplicating effort?
> 2). What are the licensing implications? (No, I don't want to start a CDDL vs. GPL war)
> 3). Would it make sense to have this as a separate module? Can it even be made into a module?
If you need any help with the interposers, drop me a line, I'm on of the
Solaris apptrace(1) developers, which heavily used dlopen().
For example, you can load a particular library on application startup
with LD_PRELOAD, and then just call it. I often use this for test
setups, or where I don't need to load/unload the library a lot.
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net | -- Mark Twain
More information about the samba-technical