Project

General

Profile

Feature #22105

provide a way to look up snapshotted inodes by vinodeno_t

Added by Jeff Layton about 6 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
Client, Ganesha FSAL
Labels (FS):
Pull request ID:

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.

snap_export.patch View (9.82 KB) Zheng Yan, 11/14/2017 02:46 PM


Related issues

Copied to CephFS - Backport #22239: luminous: provide a way to look up snapshotted inodes by vinodeno_t Rejected

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

FYI: here is my working-in-progress kernel patch for exporting snapped inode.

#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

Also available in: Atom PDF