ceph: correct ceph_mds_cap_peer field name

The peer seq is used as the issue_seq. Use that name for consistency.
See also ceph.git commit 1da6ef237fc7 ("include/ceph_fs: correct
ceph_mds_cap_peer field name").

Link: https://tracker.ceph.com/issues/66704
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Patrick Donnelly 2024-06-26 12:57:27 -04:00 committed by Ilya Dryomov
parent 50f42c4895
commit 8b41ac43c7
2 changed files with 10 additions and 10 deletions

View File

@ -4072,17 +4072,17 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_inode_info *ci = ceph_inode(inode);
u64 t_cap_id; u64 t_cap_id;
unsigned mseq = le32_to_cpu(ex->migrate_seq); unsigned mseq = le32_to_cpu(ex->migrate_seq);
unsigned t_seq, t_mseq; unsigned t_issue_seq, t_mseq;
int target, issued; int target, issued;
int mds = session->s_mds; int mds = session->s_mds;
if (ph) { if (ph) {
t_cap_id = le64_to_cpu(ph->cap_id); t_cap_id = le64_to_cpu(ph->cap_id);
t_seq = le32_to_cpu(ph->seq); t_issue_seq = le32_to_cpu(ph->issue_seq);
t_mseq = le32_to_cpu(ph->mseq); t_mseq = le32_to_cpu(ph->mseq);
target = le32_to_cpu(ph->mds); target = le32_to_cpu(ph->mds);
} else { } else {
t_cap_id = t_seq = t_mseq = 0; t_cap_id = t_issue_seq = t_mseq = 0;
target = -1; target = -1;
} }
@ -4120,12 +4120,12 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
if (tcap) { if (tcap) {
/* already have caps from the target */ /* already have caps from the target */
if (tcap->cap_id == t_cap_id && if (tcap->cap_id == t_cap_id &&
ceph_seq_cmp(tcap->seq, t_seq) < 0) { ceph_seq_cmp(tcap->seq, t_issue_seq) < 0) {
doutc(cl, " updating import cap %p mds%d\n", tcap, doutc(cl, " updating import cap %p mds%d\n", tcap,
target); target);
tcap->cap_id = t_cap_id; tcap->cap_id = t_cap_id;
tcap->seq = t_seq - 1; tcap->seq = t_issue_seq - 1;
tcap->issue_seq = t_seq - 1; tcap->issue_seq = t_issue_seq - 1;
tcap->issued |= issued; tcap->issued |= issued;
tcap->implemented |= issued; tcap->implemented |= issued;
if (cap == ci->i_auth_cap) { if (cap == ci->i_auth_cap) {
@ -4140,7 +4140,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
int flag = (cap == ci->i_auth_cap) ? CEPH_CAP_FLAG_AUTH : 0; int flag = (cap == ci->i_auth_cap) ? CEPH_CAP_FLAG_AUTH : 0;
tcap = new_cap; tcap = new_cap;
ceph_add_cap(inode, tsession, t_cap_id, issued, 0, ceph_add_cap(inode, tsession, t_cap_id, issued, 0,
t_seq - 1, t_mseq, (u64)-1, flag, &new_cap); t_issue_seq - 1, t_mseq, (u64)-1, flag, &new_cap);
if (!list_empty(&ci->i_cap_flush_list) && if (!list_empty(&ci->i_cap_flush_list) &&
ci->i_auth_cap == tcap) { ci->i_auth_cap == tcap) {
@ -4254,14 +4254,14 @@ static void handle_cap_import(struct ceph_mds_client *mdsc,
doutc(cl, " remove export cap %p mds%d flags %d\n", doutc(cl, " remove export cap %p mds%d flags %d\n",
ocap, peer, ph->flags); ocap, peer, ph->flags);
if ((ph->flags & CEPH_CAP_FLAG_AUTH) && if ((ph->flags & CEPH_CAP_FLAG_AUTH) &&
(ocap->seq != le32_to_cpu(ph->seq) || (ocap->seq != le32_to_cpu(ph->issue_seq) ||
ocap->mseq != le32_to_cpu(ph->mseq))) { ocap->mseq != le32_to_cpu(ph->mseq))) {
pr_err_ratelimited_client(cl, "mismatched seq/mseq: " pr_err_ratelimited_client(cl, "mismatched seq/mseq: "
"%p %llx.%llx mds%d seq %d mseq %d" "%p %llx.%llx mds%d seq %d mseq %d"
" importer mds%d has peer seq %d mseq %d\n", " importer mds%d has peer seq %d mseq %d\n",
inode, ceph_vinop(inode), peer, inode, ceph_vinop(inode), peer,
ocap->seq, ocap->mseq, mds, ocap->seq, ocap->mseq, mds,
le32_to_cpu(ph->seq), le32_to_cpu(ph->issue_seq),
le32_to_cpu(ph->mseq)); le32_to_cpu(ph->mseq));
} }
ceph_remove_cap(mdsc, ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE)); ceph_remove_cap(mdsc, ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE));

View File

@ -808,7 +808,7 @@ struct ceph_mds_caps {
struct ceph_mds_cap_peer { struct ceph_mds_cap_peer {
__le64 cap_id; __le64 cap_id;
__le32 seq; __le32 issue_seq;
__le32 mseq; __le32 mseq;
__le32 mds; __le32 mds;
__u8 flags; __u8 flags;