diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-05 13:43:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-05 13:43:22 -0500 |
commit | fb62c00a6d8942775abc23d1621db1252e2d93d1 (patch) | |
tree | ef8760123f5a2b692126ecb7a70f2689053885c1 /fs | |
parent | 5c4b4be3b6b937256103a5ae49177e0c3a17cb8f (diff) | |
parent | 455cec0abff563574cca432ced49f734117ca113 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: no .snap inside of snapped namespace
libceph: fix msgr standby handling
libceph: fix msgr keepalive flag
libceph: fix msgr backoff
libceph: retry after authorization failure
libceph: fix handling of short returns from get_user_pages
ceph: do not clear I_COMPLETE from d_release
ceph: do not set I_COMPLETE
Revert "ceph: keep reference to parent inode on ceph_dentry"
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/dir.c | 28 | ||||
-rw-r--r-- | fs/ceph/inode.c | 2 | ||||
-rw-r--r-- | fs/ceph/super.h | 1 |
3 files changed, 4 insertions, 27 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index f0aef787a102..099a58615b90 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -60,7 +60,6 @@ int ceph_init_dentry(struct dentry *dentry) | |||
60 | } | 60 | } |
61 | di->dentry = dentry; | 61 | di->dentry = dentry; |
62 | di->lease_session = NULL; | 62 | di->lease_session = NULL; |
63 | di->parent_inode = igrab(dentry->d_parent->d_inode); | ||
64 | dentry->d_fsdata = di; | 63 | dentry->d_fsdata = di; |
65 | dentry->d_time = jiffies; | 64 | dentry->d_time = jiffies; |
66 | ceph_dentry_lru_add(dentry); | 65 | ceph_dentry_lru_add(dentry); |
@@ -410,7 +409,7 @@ more: | |||
410 | spin_lock(&inode->i_lock); | 409 | spin_lock(&inode->i_lock); |
411 | if (ci->i_release_count == fi->dir_release_count) { | 410 | if (ci->i_release_count == fi->dir_release_count) { |
412 | dout(" marking %p complete\n", inode); | 411 | dout(" marking %p complete\n", inode); |
413 | ci->i_ceph_flags |= CEPH_I_COMPLETE; | 412 | /* ci->i_ceph_flags |= CEPH_I_COMPLETE; */ |
414 | ci->i_max_offset = filp->f_pos; | 413 | ci->i_max_offset = filp->f_pos; |
415 | } | 414 | } |
416 | spin_unlock(&inode->i_lock); | 415 | spin_unlock(&inode->i_lock); |
@@ -497,6 +496,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, | |||
497 | 496 | ||
498 | /* .snap dir? */ | 497 | /* .snap dir? */ |
499 | if (err == -ENOENT && | 498 | if (err == -ENOENT && |
499 | ceph_snap(parent) == CEPH_NOSNAP && | ||
500 | strcmp(dentry->d_name.name, | 500 | strcmp(dentry->d_name.name, |
501 | fsc->mount_options->snapdir_name) == 0) { | 501 | fsc->mount_options->snapdir_name) == 0) { |
502 | struct inode *inode = ceph_get_snapdir(parent); | 502 | struct inode *inode = ceph_get_snapdir(parent); |
@@ -1030,28 +1030,8 @@ out_touch: | |||
1030 | static void ceph_dentry_release(struct dentry *dentry) | 1030 | static void ceph_dentry_release(struct dentry *dentry) |
1031 | { | 1031 | { |
1032 | struct ceph_dentry_info *di = ceph_dentry(dentry); | 1032 | struct ceph_dentry_info *di = ceph_dentry(dentry); |
1033 | struct inode *parent_inode = NULL; | ||
1034 | u64 snapid = CEPH_NOSNAP; | ||
1035 | 1033 | ||
1036 | if (!IS_ROOT(dentry)) { | 1034 | dout("dentry_release %p\n", dentry); |
1037 | parent_inode = di->parent_inode; | ||
1038 | if (parent_inode) | ||
1039 | snapid = ceph_snap(parent_inode); | ||
1040 | } | ||
1041 | dout("dentry_release %p parent %p\n", dentry, parent_inode); | ||
1042 | if (parent_inode && snapid != CEPH_SNAPDIR) { | ||
1043 | struct ceph_inode_info *ci = ceph_inode(parent_inode); | ||
1044 | |||
1045 | spin_lock(&parent_inode->i_lock); | ||
1046 | if (ci->i_shared_gen == di->lease_shared_gen || | ||
1047 | snapid <= CEPH_MAXSNAP) { | ||
1048 | dout(" clearing %p complete (d_release)\n", | ||
1049 | parent_inode); | ||
1050 | ci->i_ceph_flags &= ~CEPH_I_COMPLETE; | ||
1051 | ci->i_release_count++; | ||
1052 | } | ||
1053 | spin_unlock(&parent_inode->i_lock); | ||
1054 | } | ||
1055 | if (di) { | 1035 | if (di) { |
1056 | ceph_dentry_lru_del(dentry); | 1036 | ceph_dentry_lru_del(dentry); |
1057 | if (di->lease_session) | 1037 | if (di->lease_session) |
@@ -1059,8 +1039,6 @@ static void ceph_dentry_release(struct dentry *dentry) | |||
1059 | kmem_cache_free(ceph_dentry_cachep, di); | 1039 | kmem_cache_free(ceph_dentry_cachep, di); |
1060 | dentry->d_fsdata = NULL; | 1040 | dentry->d_fsdata = NULL; |
1061 | } | 1041 | } |
1062 | if (parent_inode) | ||
1063 | iput(parent_inode); | ||
1064 | } | 1042 | } |
1065 | 1043 | ||
1066 | static int ceph_snapdir_d_revalidate(struct dentry *dentry, | 1044 | static int ceph_snapdir_d_revalidate(struct dentry *dentry, |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 5625463aa479..193bfa5e9cbd 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -707,7 +707,7 @@ static int fill_inode(struct inode *inode, | |||
707 | (issued & CEPH_CAP_FILE_EXCL) == 0 && | 707 | (issued & CEPH_CAP_FILE_EXCL) == 0 && |
708 | (ci->i_ceph_flags & CEPH_I_COMPLETE) == 0) { | 708 | (ci->i_ceph_flags & CEPH_I_COMPLETE) == 0) { |
709 | dout(" marking %p complete (empty)\n", inode); | 709 | dout(" marking %p complete (empty)\n", inode); |
710 | ci->i_ceph_flags |= CEPH_I_COMPLETE; | 710 | /* ci->i_ceph_flags |= CEPH_I_COMPLETE; */ |
711 | ci->i_max_offset = 2; | 711 | ci->i_max_offset = 2; |
712 | } | 712 | } |
713 | break; | 713 | break; |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 88fcaa21b801..20b907d76ae2 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -207,7 +207,6 @@ struct ceph_dentry_info { | |||
207 | struct dentry *dentry; | 207 | struct dentry *dentry; |
208 | u64 time; | 208 | u64 time; |
209 | u64 offset; | 209 | u64 offset; |
210 | struct inode *parent_inode; | ||
211 | }; | 210 | }; |
212 | 211 | ||
213 | struct ceph_inode_xattrs_info { | 212 | struct ceph_inode_xattrs_info { |