Skip to content
Anand Mitra edited this page Feb 25, 2011 · 6 revisions

Developers Page

The objective of this page is to document the pending features and update with current state of investigation so that contributors can pick items from here and work on them. If there are items in here which are missing please drop us a mail.

Bugs

rollback does not work correctly

A simple test case to expose the bug

[root@ztest tank]# touch f1 f2
[root@ztest tank]# zfs snapshot tank@tsnap1
[root@ztest tank]# touch f3
[root@ztest tank]# ls
f1  f2  f3
[root@ztest tank]# zfs snapshot tank@tsnap2
[root@ztest tank]# rm f1 f2
rm: remove regular empty file `f1'? y
rm: remove regular empty file `f2'? y
[root@ztest tank]# ls -l
total 1
-rw-r--r--. 1 root root 0 Feb 24 14:49 f3
[root@ztest tank]# zfs rollback -r tank@tsnap1
[root@ztest tank]# ls -l
ls: cannot access f2: No such file or directory
ls: cannot access f1: No such file or directory
total 0
?????????? ? ? ? ?            ? f1
?????????? ? ? ? ?            ? f2

At this point if you unmount and mount the filesystem again things are fine

[root@ztest ~]# zfs umount -a
cannot unshare '/tank'^P[root@ztest ~]# zfs mount -a
[root@ztest ~]# cd /tank/
[root@ztest tank]# ls -l
total 1
-rw-r--r--. 1 root root 0 Feb 24 14:48 f1
-rw-r--r--. 1 root root 0 Feb 24 14:48 f2

problems with gpt partition

Need to investigate and fix.

Pending Features

zfs allow / unallow

ability to deligate to non root users is absent. Infact zfs/zpool commands fail for non-root users.

migration from fuse/solaris/bsd

The first release had many issues with mode permissions being 000 after the import. Some of these were addressed in fix https://github.com/zfs-linux/zfs/commit/61afbd2d830232d23a157ef8769470fa9a29eba8. However we would very much like people it try this and give us some feedback.

possible problem with the library

Got a possible problem from lists@beobal.com. We haven’t really validated that libraries are linkable and usable. This is a useful feature to build storage management applications.

A couple of months ago, I worked on a prototype for a project where
some of the functionality provided by zfs (snapshots, dynamic resource
allocation) are of real benefit. I used the JNA[1] wrapper for zfs
published at http://zfs.dev.java.net (I also have a fork on github[2])
to control the filesystem from my app code, which was built & deployed
to OpenSolaris. This worked great, libzfs worked just as expected and
we found that we could meet pretty much all of the design goals using
zfs. However, for production we'd much prefer to deploy to a Linux
environment, so I've been trying to use libzfs in conjunction with the
kqstor port. So far, I have zfs modules built and installed on linux,
and I can create pools, filesystems, snapshots etc from the shell, but
I'm having no joy getting the JNA wrapper to load libzfs.so At this
point, my experience (and google-fu) are exhausted - attempting to
load libzfs as a native library fails with the following stacktrace:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to
load library 'zfs': /usr/local/lib/libzfs.so: undefined symbol:
zfs_userquota_prop_prefixes
       at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:163)
       at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:236)
       at com.sun.jna.Library$Handler.<init>(Library.java:140)
       at com.sun.jna.Native.loadLibrary(Native.java:380)
       at com.sun.jna.Native.loadLibrary(Native.java:364)
       at org.jvnet.solaris.libzfs.jna.libzfs.<clinit>(libzfs.java:46)
       at org.jvnet.solaris.libzfs.LibZFS.<init>(LibZFS.java:54)
       at com.talis.zfs.Main.<init>(Main.java:33)
       at com.talis.zfs.Main.main(Main.java:108)

Running nm /usr/local/lib/libzfs.so indeed shows that the
zfs_userquota_prop_prefixes symbol is undefined (as are all the others
from zcommon/zfs_props.c), I'm a complete n00b with C/system
libraries, so I don't know whether this is a problem or not. This is
also the first time I've done any real work with JNA (or JNI for that
matter) so I'm at a loss to track down the cause of the problem, or
even identify whether its an issue on the Java or C side of the
equation. I appreciate that this is probably a bit of an obscure
question for this list, does anyone have any advice for me?

Performance Fixes

zvols are very slow

This is an very easily reproducible problem.

  • create a pool
  • create a zvol “zfs create -V …”
  • benchmark by “time dd if=/dev/zero/ of=/dev/tank/zvol bs=1024 count=10000”
  • try the same on /dev/sdb1 (make sure you don’t over write valuable data)
  • the dd will be an order of magnitude slower than the raw device.

One would expect it to be marginally slow as we are going through the filesystem stack. But over 100% degradation is a clear sign of a bug. To cross check that we did not introduce any artifact while adding the posix layer on Brian’s code. We tried the same thing with Brian’s code and found the same degradation. One further cross check was to try this on opensolaris. And as expected the performance degradation on opensolaris was not as high.

Ironically if you do the same experiment where you are writing to file in the zfs filesystem the performance is huge.

We have been able to narrow the problem to a few functions where the bug might be but we have yet to find the root cause.

Phoronix benchmark

Investigating the gap in the phoronix benchmark and addressing them.

Clone this wiki locally