mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 15:19:51 +00:00
ceph: make sure flushsnap messages are sent in proper order
Before sending new flushsnap message, check if there are old flushsnap messages that need to be re-sent. If there are, re-send old messages first. This guarantees ordering of flushsnap messages. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
a5cd74ad38
commit
24d063acc2
@ -1457,6 +1457,12 @@ retry:
|
|||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure flushsnap messages are sent in proper order.
|
||||||
|
if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) {
|
||||||
|
__kick_flushing_caps(mdsc, session, ci, 0);
|
||||||
|
ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH;
|
||||||
|
}
|
||||||
|
|
||||||
__ceph_flush_snaps(ci, session);
|
__ceph_flush_snaps(ci, session);
|
||||||
out:
|
out:
|
||||||
spin_unlock(&ci->i_ceph_lock);
|
spin_unlock(&ci->i_ceph_lock);
|
||||||
@ -1904,11 +1910,7 @@ ack:
|
|||||||
(ci->i_ceph_flags &
|
(ci->i_ceph_flags &
|
||||||
(CEPH_I_KICK_FLUSH | CEPH_I_FLUSH_SNAPS))) {
|
(CEPH_I_KICK_FLUSH | CEPH_I_FLUSH_SNAPS))) {
|
||||||
if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) {
|
if (ci->i_ceph_flags & CEPH_I_KICK_FLUSH) {
|
||||||
spin_lock(&mdsc->cap_dirty_lock);
|
__kick_flushing_caps(mdsc, session, ci, 0);
|
||||||
oldest_flush_tid = __get_oldest_flush_tid(mdsc);
|
|
||||||
spin_unlock(&mdsc->cap_dirty_lock);
|
|
||||||
__kick_flushing_caps(mdsc, session, ci,
|
|
||||||
oldest_flush_tid);
|
|
||||||
ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH;
|
ci->i_ceph_flags &= ~CEPH_I_KICK_FLUSH;
|
||||||
}
|
}
|
||||||
if (ci->i_ceph_flags & CEPH_I_FLUSH_SNAPS)
|
if (ci->i_ceph_flags & CEPH_I_FLUSH_SNAPS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user