diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-11-15 17:39:40 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-05-07 19:22:36 +0200 |
commit | 570df4e9c23f861aa3f8f2954468c534a033bf1a (patch) | |
tree | 79fd293eeae6aa7d42ab60d38637abc78df72f7e /net/caif | |
parent | 0c44a8e0fc55f56a70f72e67d7cc5b9341dae7d1 (diff) | |
download | linux-stable-570df4e9c23f861aa3f8f2954468c534a033bf1a.tar.gz linux-stable-570df4e9c23f861aa3f8f2954468c534a033bf1a.tar.bz2 linux-stable-570df4e9c23f861aa3f8f2954468c534a033bf1a.zip |
ceph: snapshot nfs re-export
To support snapshot nfs re-export, we need a way to lookup snapped
inode by file handle. For directory inode, snapped metadata are always
stored together with head inode. Client just need to pass vinodeno_t
to MDS. For non-directory inode, there can be multiple version of
snapped inodes and they can be stored in different dirfrags. Besides
vinodeno_t, client also need to tell mds from which dirfrag it got the
snapped inode.
Another problem of supporting snapshot nfs re-export is that there
can be multiple paths to access a snapped inode. For example:
mkdir -p d1/d2/d3
mkdir d1/.snap/s1
Paths 'd1/.snap/s1/d2/d3', 'd1/d2/.snap/_s1_<inode number of d1>/d3'
and 'd1/d2/d3/.snap/_s1_<inode number of d1>' are all reference to the
same snapped inode. For a given snapped inode, There is no convenient
way to get the first form and the second form paths. For simplicity,
ceph_get_parent() return snapdir for snapped directory inode.
Furthermore, client may access snapshot of deleted directory. For
example:
mkdir -p d1/d2
mkdir d1/.snap/s1
open d1/.snap/s1/d2
rm -rf d1/d2
<nfs server restart>
The path constucted by ceph_get_parent() and ceph_get_name() is
'<inode of d2>/.snap/_s1_<inode number of d1>'. Futher lookup parent
of <inode of d2> will fail. To workaround this case, this patch uses
d_obtain_root() to get dentry for snapdir of deleted directory.
snapdir dentry has no DCACHE_DISCONNECTED flag set, reconnect_path()
stops when it reaches snapdir dentry.
Link: http://tracker.ceph.com/issues/22105
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/caif')
0 files changed, 0 insertions, 0 deletions