diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-06-20 04:00:31 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-07-08 08:01:44 -0400 |
commit | 054f8d41affbaeddca15ac39366a1f2f4b4f4488 (patch) | |
tree | d7dcda1875323c4084a2dbed04a141eaab294d9f /fs/ceph/caps.c | |
parent | 5c30835690f12e14f88dd2e90c8cbb0ea8eb975f (diff) |
ceph: clear CEPH_I_KICK_FLUSH flag inside __kick_flushing_caps()
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 2e22efd79b0c..82a3583a0fd9 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -1605,10 +1605,8 @@ retry: | |||
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | // make sure flushsnap messages are sent in proper order. | 1607 | // make sure flushsnap messages are sent in proper order. |
1608 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) { | 1608 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) |
1609 | __kick_flushing_caps(mdsc, session, ci, 0); | 1609 | __kick_flushing_caps(mdsc, session, ci, 0); |
1610 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
1611 | } | ||
1612 | 1610 | ||
1613 | __ceph_flush_snaps(ci, session); | 1611 | __ceph_flush_snaps(ci, session); |
1614 | out: | 1612 | out: |
@@ -2050,10 +2048,8 @@ ack: | |||
2050 | if (cap == ci->i_auth_cap && | 2048 | if (cap == ci->i_auth_cap && |
2051 | (ci->i_ceph_flags & | 2049 | (ci->i_ceph_flags & |
2052 | (CEPH_I_KICK_FLUSH | CEPH_I_FLUSH_SNAPS))) { | 2050 | (CEPH_I_KICK_FLUSH | CEPH_I_FLUSH_SNAPS))) { |
2053 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) { | 2051 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) |
2054 | __kick_flushing_caps(mdsc, session, ci, 0); | 2052 | __kick_flushing_caps(mdsc, session, ci, 0); |
2055 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
2056 | } | ||
2057 | if (ci->i_ceph_flags & CEPH_I_FLUSH_SNAPS) | 2053 | if (ci->i_ceph_flags & CEPH_I_FLUSH_SNAPS) |
2058 | __ceph_flush_snaps(ci, session); | 2054 | __ceph_flush_snaps(ci, session); |
2059 | 2055 | ||
@@ -2323,6 +2319,8 @@ static void __kick_flushing_caps(struct ceph_mds_client *mdsc, | |||
2323 | int ret; | 2319 | int ret; |
2324 | u64 first_tid = 0; | 2320 | u64 first_tid = 0; |
2325 | 2321 | ||
2322 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
2323 | |||
2326 | list_for_each_entry(cf, &ci->i_cap_flush_list, i_list) { | 2324 | list_for_each_entry(cf, &ci->i_cap_flush_list, i_list) { |
2327 | if (cf->tid < first_tid) | 2325 | if (cf->tid < first_tid) |
2328 | continue; | 2326 | continue; |
@@ -2412,7 +2410,6 @@ void ceph_early_kick_flushing_caps(struct ceph_mds_client *mdsc, | |||
2412 | */ | 2410 | */ |
2413 | if ((cap->issued & ci->i_flushing_caps) != | 2411 | if ((cap->issued & ci->i_flushing_caps) != |
2414 | ci->i_flushing_caps) { | 2412 | ci->i_flushing_caps) { |
2415 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
2416 | /* encode_caps_cb() also will reset these sequence | 2413 | /* encode_caps_cb() also will reset these sequence |
2417 | * numbers. make sure sequence numbers in cap flush | 2414 | * numbers. make sure sequence numbers in cap flush |
2418 | * message match later reconnect message */ | 2415 | * message match later reconnect message */ |
@@ -2452,7 +2449,6 @@ void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, | |||
2452 | continue; | 2449 | continue; |
2453 | } | 2450 | } |
2454 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) { | 2451 | if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) { |
2455 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
2456 | __kick_flushing_caps(mdsc, session, ci, | 2452 | __kick_flushing_caps(mdsc, session, ci, |
2457 | oldest_flush_tid); | 2453 | oldest_flush_tid); |
2458 | } | 2454 | } |
@@ -2480,7 +2476,6 @@ static void kick_flushing_inode_caps(struct ceph_mds_client *mdsc, | |||
2480 | oldest_flush_tid = __get_oldest_flush_tid(mdsc); | 2476 | oldest_flush_tid = __get_oldest_flush_tid(mdsc); |
2481 | spin_unlock(&mdsc->cap_dirty_lock); | 2477 | spin_unlock(&mdsc->cap_dirty_lock); |
2482 | 2478 | ||
2483 | ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH; | ||
2484 | __kick_flushing_caps(mdsc, session, ci, oldest_flush_tid); | 2479 | __kick_flushing_caps(mdsc, session, ci, oldest_flush_tid); |
2485 | spin_unlock(&ci->i_ceph_lock); | 2480 | spin_unlock(&ci->i_ceph_lock); |
2486 | } else { | 2481 | } else { |