diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-01-02 22:16:27 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-29 12:36:10 -0500 |
commit | d84b37f9fa9b23a46af28d2e9430c87718b6b044 (patch) | |
tree | 7c7a8ce9643d040420acfdf327fdf4542729b95d /fs/ceph/caps.c | |
parent | 7d9c9193b5d0b1b806f453a3baa9bfe7e6fac52d (diff) |
ceph: limit rate of cap import/export error messages
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 7e09fa8ab0ed..f28efaecbb50 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -3438,7 +3438,14 @@ retry: | |||
3438 | */ | 3438 | */ |
3439 | 3439 | ||
3440 | issued = cap->issued; | 3440 | issued = cap->issued; |
3441 | WARN_ON(issued != cap->implemented); | 3441 | if (issued != cap->implemented) |
3442 | pr_err_ratelimited("handle_cap_export: issued != implemented: " | ||
3443 | "ino (%llx.%llx) mds%d seq %d mseq %d " | ||
3444 | "issued %s implemented %s\n", | ||
3445 | ceph_vinop(inode), mds, cap->seq, cap->mseq, | ||
3446 | ceph_cap_string(issued), | ||
3447 | ceph_cap_string(cap->implemented)); | ||
3448 | |||
3442 | 3449 | ||
3443 | tcap = __get_cap_for_mds(ci, target); | 3450 | tcap = __get_cap_for_mds(ci, target); |
3444 | if (tcap) { | 3451 | if (tcap) { |
@@ -3584,12 +3591,13 @@ retry: | |||
3584 | if ((ph->flags & CEPH_CAP_FLAG_AUTH) && | 3591 | if ((ph->flags & CEPH_CAP_FLAG_AUTH) && |
3585 | (ocap->seq != le32_to_cpu(ph->seq) || | 3592 | (ocap->seq != le32_to_cpu(ph->seq) || |
3586 | ocap->mseq != le32_to_cpu(ph->mseq))) { | 3593 | ocap->mseq != le32_to_cpu(ph->mseq))) { |
3587 | pr_err("handle_cap_import: mismatched seq/mseq: " | 3594 | pr_err_ratelimited("handle_cap_import: " |
3588 | "ino (%llx.%llx) mds%d seq %d mseq %d " | 3595 | "mismatched seq/mseq: ino (%llx.%llx) " |
3589 | "importer mds%d has peer seq %d mseq %d\n", | 3596 | "mds%d seq %d mseq %d importer mds%d " |
3590 | ceph_vinop(inode), peer, ocap->seq, | 3597 | "has peer seq %d mseq %d\n", |
3591 | ocap->mseq, mds, le32_to_cpu(ph->seq), | 3598 | ceph_vinop(inode), peer, ocap->seq, |
3592 | le32_to_cpu(ph->mseq)); | 3599 | ocap->mseq, mds, le32_to_cpu(ph->seq), |
3600 | le32_to_cpu(ph->mseq)); | ||
3593 | } | 3601 | } |
3594 | __ceph_remove_cap(ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE)); | 3602 | __ceph_remove_cap(ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE)); |
3595 | } | 3603 | } |