ZFS Quickly show pwd to zfs dataset relationship

Is there a command that quickly shows the relationship between present working directory and its zfs dataset?

If we already know the pwd value, we can simply zfs list | grep CLUE_FROM_PWD_VALUE. What is the best way to combine a pwd with zfs list and grep? We could build a few lines of script to do this, but is there such a function already made?
 
You can get the ZFS dataset for the current directory easily enough -

Code:
root@s1:/storage/config/ssl # df .
Filesystem     1K-blocks Used     Avail Capacity  Mounted on
storage/config 700965479  863 700964615     0%    /storage/config
Code:
root@s1:/storage/config/ssl # df . | cut -wf1 | tail -n1
storage/config
 
Back
Top