ceph: trivial comment fix
PATCH 1/1 ceph: trivial comment fix
From: "J. Bruce Fields" <[email protected]>
"disconnected" is too easily confused with "DCACHE_DISCONNECTED". I think "unhashed" is the more precise term here.
--- fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Just ran across this while wondering what d_find_alias callers do....
fs/ceph/caps.c +3 -3
@@ -2350,11 +2350,11 @@ static void invalidate_aliases(struct inode *inode)d_prune_aliases (inode);/* * For non-directory inode, d_find_alias() only returns -* connected dentry. After calling d_invalidate(), the -* dentry become disconnected. +* hashed dentry. After calling d_invalidate(), the +* dentry becomes unhashed. * * For directory inode, d_find_alias() can return -* disconnected dentry. But directory inode should have +* unhashed dentry. But directory inode should have * one alias at most. */ while ((dn =d_find_alias (inode))) {
Signature · 1 line
1.7.9.5
Quoted 4 lines · J. Bruce Fields
From: "J. Bruce Fields" <[email protected]>
"disconnected" is too easily confused with "
DCACHE_DISCONNECTED". I think "unhashed" is the more precise term here.
Good point. Applied, thanks!
sage
Quoted 31 lines
Signed-off-by J. Bruce Fields <[email protected]>--- fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Just ran across this while wondering what
d_find_aliascallers do....fs/ceph/caps.c +3
-3@@ -2350,11 +2350,11 @@ static void invalidate_aliases(struct inode *inode)d_prune_aliases (inode);/* * For non-directory inode, d_find_alias() only returns -* connected dentry. After calling d_invalidate(), the -* dentry become disconnected. +* hashed dentry. After calling d_invalidate(), the +* dentry becomes unhashed. * * For directory inode, d_find_alias() can return -* disconnected dentry. But directory inode should have +* unhashed dentry. But directory inode should have * one alias at most. */ while ((dn =d_find_alias (inode))) {Signature · 1 line
1.7.9.5
Quoted 7 lines · Sage Weil
Quoted 4 lines · J. Bruce Fields
From: "J. Bruce Fields" <[email protected]>
"disconnected" is too easily confused with "
DCACHE_DISCONNECTED". I think "unhashed" is the more precise term here.Good point. Applied, thanks!
Thanks! While I'm looking, there's another d_find_alias() caller in build_inode_path. What's that? (Do the mds protocol messages actually use full paths?) And will this break if you get a DCACHE_DISCONNECTED or an unhashed alias?
--b.
Quoted 34 lines
sage
Quoted 31 lines
Signed-off-by J. Bruce Fields <[email protected]>--- fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Just ran across this while wondering what
d_find_aliascallers do....fs/ceph/caps.c +3
-3@@ -2350,11 +2350,11 @@ static void invalidate_aliases(struct inode *inode)d_prune_aliases (inode);/* * For non-directory inode, d_find_alias() only returns -* connected dentry. After calling d_invalidate(), the -* dentry become disconnected. +* hashed dentry. After calling d_invalidate(), the +* dentry becomes unhashed. * * For directory inode, d_find_alias() can return -* disconnected dentry. But directory inode should have +* unhashed dentry. But directory inode should have * one alias at most. */ while ((dn =d_find_alias (inode))) {Signature · 1 line
1.7.9.5
Quoted 7 lines · J. Bruce Fields
Quoted 6 lines · Sage Weil
Quoted 4 lines · J. Bruce Fields
From: "J. Bruce Fields" <[email protected]>
"disconnected" is too easily confused with "
DCACHE_DISCONNECTED". I think "unhashed" is the more precise term here.
Quoted 6 lines
Quoted 1 line
Good point. Applied, thanks!
Thanks! While I'm looking, there's another
d_find_alias()caller inbuild_inode_path. What's that? (Do the mds protocol messages actually use full paths?) And will this break if you get aDCACHE_DISCONNECTEDor an unhashed alias?
They build a path relative to the first non-snapped parent, which in most cases is either no path at all (just an ino) or a single path segment. The exception is if you are inside a snapshotted directory (e.g. a/b/.snap/mysnap/c/d), in which case it can be deeper. In any case, I think the only problem is if you have a disconnected dentry from an old nfs filename for an inode within a snapshot. There may be some issues there (nfs reexport + snaps isn't currently part of the test suite), but in general I don't think there is any issue with disconnected dentries.
sage
Quoted 43 lines
--b.
Quoted 26 lines
sage
Quoted 23 lines
Signed-off-by J. Bruce Fields <[email protected]>--- fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Just ran across this while wondering what
d_find_aliascallers do....fs/ceph/caps.c +2
-3@@ -2350,11 +2350,11 @@ static void invalidate_aliases(struct inode *inode)d_prune_aliases (inode);/* * For non-directory inode, d_find_alias() only returns -* connected dentry. After calling d_invalidate(), the -* dentry become disconnected. +* hashed dentry. After calling d_invalidate(), the +* dentry becomes unhashed. * * For directory inode, d_find_alias() can return -* disconnected dentry. But directory inode should have Quoted 8 lines
Quoted 8 lines
fs/ceph/caps.c +1
-0+* unhashed dentry. But directory inode should have * one alias at most. */ while ((dn =d_find_alias (inode))) {Signature · 1 line
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Sage Weil
Quoted 7 lines · J. Bruce Fields
Quoted 6 lines · Sage Weil
Quoted 4 lines · J. Bruce Fields
From: "J. Bruce Fields" <[email protected]>
"disconnected" is too easily confused with "
DCACHE_DISCONNECTED". I think "unhashed" is the more precise term here.Quoted 6 lines
Quoted 1 line
Good point. Applied, thanks!
Thanks! While I'm looking, there's another
d_find_alias()caller inbuild_inode_path. What's that? (Do the mds protocol messages actually use full paths?) And will this break if you get aDCACHE_DISCONNECTEDor an unhashed alias?
Quoted 6 lines
They build a path relative to the first non-snapped parent, which in most cases is either no path at all (just an ino) or a single path segment. The exception is if you are inside a snapshotted directory (e.g. a/b/.snap/mysnap/c/d), in which case it can be deeper. In any case, I think the only problem is if you have a disconnected dentry from an old nfs filename for an inode within a snapshot.
Right, so I guess there may be a problem you get a disconnected dentry that's not yet connected all the way back up to the main dcache, in which case the !IS_ROOT tests in the loops in ceph_mdsc_build_path() may fail too soon.
--b.
Quoted 50 lines
There may be some issues
there (nfs reexport + snaps isn't currently part of the test suite), but in general I don't think there is any issue with disconnected dentries.sage
Quoted 43 lines
--b.
Quoted 26 lines
sage
Quoted 23 lines
Signed-off-by J. Bruce Fields <[email protected]>--- fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Just ran across this while wondering what
d_find_aliascallers do....fs/ceph/caps.c +2
-3@@ -2350,11 +2350,11 @@ static void invalidate_aliases(struct inode *inode)d_prune_aliases (inode);/* * For non-directory inode, d_find_alias() only returns -* connected dentry. After calling d_invalidate(), the -* dentry become disconnected. +* hashed dentry. After calling d_invalidate(), the +* dentry becomes unhashed. * * For directory inode, d_find_alias() can return -* disconnected dentry. But directory inode should have Quoted 8 lines
Quoted 8 lines
fs/ceph/caps.c +1
-0+* unhashed dentry. But directory inode should have * one alias at most. */ while ((dn =d_find_alias (inode))) {Signature · 1 line
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html