forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is still a work in progress, I would say it's roughly 90% complete but it needs additional testing, verification, and some more cleanup. However, it's in good enough shape to start getting some feedback on. I've done testing with RHEL6.2 where everything works, but there are a few lingering issues: 1) The .zfs/snapshot directory automount support requires a 2.6.37 or newer kernel. The exception is RHEL6.2 which has backported the d_automount patches. Support for older kernels is possible with follow_link() but it needs to be done carefully. Getting all the reference counting right and avoiding GPL-only functions will be tricky. 2) Support for mkdir/rmdir/mv has been implemented in the .zfs/snapshap directory just like Solaris but it needs more testing. This functionality is only available to root until zfs delegations are finished. * mkdir - create a snapshot * rmdir - destroy a snapshot * mv - rename a snapshot 3) The .zfs/shares directory is created but none of the smb functionality is implemented. 4) No testing via nfs over zfs has yet been done. However, I did lay the ground work such that we should be able to traverse in in to the .zfs directory successfully. It's mainly a matter of trying it and fixing the problems. 5) It's currently unsafe to manually unmount an automounted snapshot before it expires. This should be an unlikely even since the mounts are suppressed from /etc/mtab but we still need to handle it safely. My feeling is the best way to go about this will be to rework the unmount path so that the zfs_umount() call for a snapshot removes the matching entry from the parent z_ctldir_snaps tree. This should allow for additional cleanup of the tree insertion/removal code since all removals manual and automatic will use the same call path. 6) As for cleanup I don't care for having to set MNT_SHRINKABLE in zpl_getattr(). We should be able to acheive this in the mount function by using follow_down() to get the new vfsmount. We could then correctly return this instead of signaling a race by returning NULL. However, getting the reference counting right might be tricky. This could also be done when the code is refactored to support follow_link(). Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#173
- Loading branch information
1 parent
30a9524
commit 6e2c435
Showing
79 changed files
with
1,984 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
dnl # | ||
dnl # 2.6.37 API change | ||
dnl # The dops->d_automount() dentry operation was added as a clean | ||
dnl # solution to handling automounts. Prior to this cifs/nfs clients | ||
dnl # which required automount support would abuse the follow_link() | ||
dnl # operation on directories for this purpose. | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_AUTOMOUNT], [ | ||
AC_MSG_CHECKING([whether dops->d_automount() exists]) | ||
ZFS_LINUX_TRY_COMPILE([ | ||
#include <linux/dcache.h> | ||
],[ | ||
struct vfsmount *(*d_automount) (struct path *) = NULL; | ||
struct dentry_operations dops __attribute__ ((unused)) = { | ||
.d_automount = d_automount, | ||
}; | ||
],[ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_AUTOMOUNT, 1, [dops->automount() exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.