-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support accessing .zfs/snapshot via NFS #2797
Commits on Feb 12, 2015
-
Set MNT_SHRINKABLE on snapshot mount
We could set MNT_SHRINKABLE when mouting snapshot mount instead of using occasional post mount getattr. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com> Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c9e1346 - Browse repository at this point
Copy the full SHA c9e1346View commit details -
Fix invalid fileid for snapshot root dentry
Prevents NFS client from detection of different fileids of snapshot root dentry before & after snapshot mount. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c7f3a6a - Browse repository at this point
Copy the full SHA c7f3a6aView commit details -
zfsctl: No need to sync ctldir inodes
There's no metadata to write to disk for ctldir inodes. So we check if a inode belongs to the ctldir in zpl_commit_metadata, and returns immediately if it is. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c373c76 - Browse repository at this point
Copy the full SHA c373c76View commit details -
Save snapshot root dentry on snapshot mount
When it's need to decode snapshot file handly it hard to get snapshot sb. On the contrary on snapshot mount it's easy to get snapshot sb because mount path available in the context of snapshot mount. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9c03a22 - Browse repository at this point
Copy the full SHA 9c03a22View commit details -
Ensure long fids is used for snapshot
We have to use long fids to include the dataset id. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e46013a - Browse repository at this point
Copy the full SHA e46013aView commit details
Commits on Feb 16, 2015
-
Add helper function to get mount path of a dataset
This will be used in later commit which add support for decoding snapshot fh. This is needed because in case the snapshot is not mounted when decoding its fh, we have to trigger an automount. And to trigger a snapshot automount, we have to know its path. In this commit we add a helper function which get the mount path from zpool and dataset properties (namely altroot and mountpoint properties). This is practically the same method used by the userspace zfs commandline tool. This method won't work for dataset with 'legacy' mountpoint, but we have to do it this way because newer Linux kernel hides the mount point information from file systems. Theoretically the proper solution of the problem is to eliminate the need to mount a snapshot, and just generate all snapshot related information on access. However this will require a lot more work and probably significant changes to how zfs handle snapshots. So I think we better leave this for later. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2a8749a - Browse repository at this point
Copy the full SHA 2a8749aView commit details -
Add encode and decode support for snapshot fh
The snapshot file handle should provide enough info in order to get the right objsetid and right object in the objset defined by objsetid. Therefore we encode the snapshot fh as objsetid + inode. The objsetid should be encoded for every snapshot dentry including root dentry; for snapshot root dentry zf_gen should be 0. To decode a snapshot fh, we simply extract the objsetid and the inode, then we try to retrive the super block stored in the snapentry. Zero matching snapentry means the snapshot is not mounted. In this case we try to trigger a automount of the snapshot by doing a path lookup on the full snapshot path, and then try again. If zf_gen is 0, we return the snapshot root dentry. Also added a configure check for kern_path, since it is not available in earlier kernels. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com> Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4bdaed0 - Browse repository at this point
Copy the full SHA 4bdaed0View commit details