Feature #22105
provide a way to look up snapshotted inodes by vinodeno_t
0%
Description
An NFS client could conceivably present a filehandle that refers to a snapshot inode after ganesha has been stopped and restarted. Currently we have no interface for looking up a snapshot inode based on a inode number + snapid tuple.
I imagine that people will expect to be able to access snapshots via NFS, so we will likely need this ability. Basically, we need an analogue to ceph_ll_lookup_inode that takes a vinodeno_t instead of just an inode number.
Related issues
History
#1 Updated by Jeff Layton about 6 years ago
- Subject changed from provide a way to look up snapshotted inodes by ino+snapid tuple to provide a way to look up snapshotted inodes by vinodeno_t
#2 Updated by Zheng Yan about 6 years ago
For directory inode, snapped inode are always stored together with head inode. The hard part is non-directory inode, because there can multiple snapped inodes stored in different directories.
Is it possible to make nfs client remember snapped inode's parent directory (and hash of corresponding dentry). If we can, implementing this function should be easy.
#3 Updated by Jeff Layton about 6 years ago
Zheng Yan wrote:
Is it possible to make nfs client remember snapped inode's parent directory (and hash of corresponding dentry). If we can, implementing this function should be easy.
That may be possible. NFSv4 filehandles are 128 bits. We currently just encode vinodeno_t as the filehandle, but we probably could mix in some info about the parent inode if that would be useful.
Is it possible though that a file like that could be renamed into a different directory? If so, then would its filehandle have to change?
#4 Updated by Zheng Yan about 6 years ago
Jeff Layton wrote:
Is it possible though that a file like that could be renamed into a different directory? If so, then would its filehandle have to change?
For snapped inode, it's impossible because snapshot is readonly
#5 Updated by Zheng Yan about 6 years ago
- Status changed from New to In Progress
#6 Updated by Zheng Yan about 6 years ago
- File snap_export.patch View added
FYI: here is my working-in-progress kernel patch for exporting snapped inode.
#7 Updated by Zheng Yan about 6 years ago
patch for mds:
https://github.com/ceph/ceph/pull/18942
patch for kernel:
commit "ceph: snapshot nfs re-export"
https://github.com/ceph/ceph-client/commit/9909be1e0e9b447edc6c35b15feae3da959f1d39
#8 Updated by Zheng Yan about 6 years ago
- Status changed from In Progress to 12
#9 Updated by Patrick Donnelly about 6 years ago
- Status changed from 12 to Pending Backport
- Backport set to luminous
#10 Updated by Nathan Cutler about 6 years ago
- Copied to Backport #22239: luminous: provide a way to look up snapshotted inodes by vinodeno_t added
#11 Updated by Patrick Donnelly about 5 years ago
- Status changed from Pending Backport to Resolved
- Backport deleted (
luminous)
#12 Updated by Patrick Donnelly over 4 years ago
- Category deleted (
109) - Component(FS) Ganesha FSAL added