diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-04 10:28:07 +0400 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-01-17 22:42:37 +0400 |
commit | 8a92a119b292012a9bd920b908c3e9f1c512291d (patch) | |
tree | 8ce580d5c29dac00ddbd0cc1922865ff3395366c | |
parent | a41bad1a9b9f9982eb9b451165724c5f81096683 (diff) | |
download | linux-8a92a119b292012a9bd920b908c3e9f1c512291d.tar.xz |
ceph: move dirty inode to migrating list when clearing auth caps
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | fs/ceph/caps.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index a1d9bb30c1bf..a9fe2d5784c9 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -611,8 +611,16 @@ retry: if (flags & CEPH_CAP_FLAG_AUTH) ci->i_auth_cap = cap; - else if (ci->i_auth_cap == cap) + else if (ci->i_auth_cap == cap) { ci->i_auth_cap = NULL; + spin_lock(&mdsc->cap_dirty_lock); + if (!list_empty(&ci->i_dirty_item)) { + dout(" moving %p to cap_dirty_migrating\n", inode); + list_move(&ci->i_dirty_item, + &mdsc->cap_dirty_migrating); + } + spin_unlock(&mdsc->cap_dirty_lock); + } dout("add_cap inode %p (%llx.%llx) cap %p %s now %s seq %d mds%d\n", inode, ceph_vinop(inode), cap, ceph_cap_string(issued), |