Project

General

Profile

Actions

Feature #22105

closed

provide a way to look up snapshotted inodes by vinodeno_t

Added by Jeff Layton over 6 years ago. Updated about 5 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.


Files

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

Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #22239: luminous: provide a way to look up snapshotted inodes by vinodeno_tRejectedZheng YanActions
Actions #1

Updated by Jeff Layton over 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
Actions #2

Updated by Zheng Yan over 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.

Actions #3

Updated by Jeff Layton over 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?

Actions #4

Updated by Zheng Yan over 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

Actions #5

Updated by Zheng Yan over 6 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Zheng Yan over 6 years ago

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

Actions #8

Updated by Zheng Yan over 6 years ago

  • Status changed from In Progress to 12
Actions #9

Updated by Patrick Donnelly over 6 years ago

  • Status changed from 12 to Pending Backport
  • Backport set to luminous
Actions #10

Updated by Nathan Cutler over 6 years ago

  • Copied to Backport #22239: luminous: provide a way to look up snapshotted inodes by vinodeno_t added
Actions #11

Updated by Patrick Donnelly over 5 years ago

  • Status changed from Pending Backport to Resolved
  • Backport deleted (luminous)
Actions #12

Updated by Patrick Donnelly about 5 years ago

  • Category deleted (109)
  • Component(FS) Ganesha FSAL added
Actions

Also available in: Atom PDF