Skip to content

Commit 8b41ac4

Browse files
batrickidryomov
authored andcommitted
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>
1 parent 50f42c4 commit 8b41ac4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

fs/ceph/caps.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4072,17 +4072,17 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
40724072
struct ceph_inode_info *ci = ceph_inode(inode);
40734073
u64 t_cap_id;
40744074
unsigned mseq = le32_to_cpu(ex->migrate_seq);
4075-
unsigned t_seq, t_mseq;
4075+
unsigned t_issue_seq, t_mseq;
40764076
int target, issued;
40774077
int mds = session->s_mds;
40784078

40794079
if (ph) {
40804080
t_cap_id = le64_to_cpu(ph->cap_id);
4081-
t_seq = le32_to_cpu(ph->seq);
4081+
t_issue_seq = le32_to_cpu(ph->issue_seq);
40824082
t_mseq = le32_to_cpu(ph->mseq);
40834083
target = le32_to_cpu(ph->mds);
40844084
} else {
4085-
t_cap_id = t_seq = t_mseq = 0;
4085+
t_cap_id = t_issue_seq = t_mseq = 0;
40864086
target = -1;
40874087
}
40884088

@@ -4120,12 +4120,12 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
41204120
if (tcap) {
41214121
/* already have caps from the target */
41224122
if (tcap->cap_id == t_cap_id &&
4123-
ceph_seq_cmp(tcap->seq, t_seq) < 0) {
4123+
ceph_seq_cmp(tcap->seq, t_issue_seq) < 0) {
41244124
doutc(cl, " updating import cap %p mds%d\n", tcap,
41254125
target);
41264126
tcap->cap_id = t_cap_id;
4127-
tcap->seq = t_seq - 1;
4128-
tcap->issue_seq = t_seq - 1;
4127+
tcap->seq = t_issue_seq - 1;
4128+
tcap->issue_seq = t_issue_seq - 1;
41294129
tcap->issued |= issued;
41304130
tcap->implemented |= issued;
41314131
if (cap == ci->i_auth_cap) {
@@ -4140,7 +4140,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
41404140
int flag = (cap == ci->i_auth_cap) ? CEPH_CAP_FLAG_AUTH : 0;
41414141
tcap = new_cap;
41424142
ceph_add_cap(inode, tsession, t_cap_id, issued, 0,
4143-
t_seq - 1, t_mseq, (u64)-1, flag, &new_cap);
4143+
t_issue_seq - 1, t_mseq, (u64)-1, flag, &new_cap);
41444144

41454145
if (!list_empty(&ci->i_cap_flush_list) &&
41464146
ci->i_auth_cap == tcap) {
@@ -4254,14 +4254,14 @@ static void handle_cap_import(struct ceph_mds_client *mdsc,
42544254
doutc(cl, " remove export cap %p mds%d flags %d\n",
42554255
ocap, peer, ph->flags);
42564256
if ((ph->flags & CEPH_CAP_FLAG_AUTH) &&
4257-
(ocap->seq != le32_to_cpu(ph->seq) ||
4257+
(ocap->seq != le32_to_cpu(ph->issue_seq) ||
42584258
ocap->mseq != le32_to_cpu(ph->mseq))) {
42594259
pr_err_ratelimited_client(cl, "mismatched seq/mseq: "
42604260
"%p %llx.%llx mds%d seq %d mseq %d"
42614261
" importer mds%d has peer seq %d mseq %d\n",
42624262
inode, ceph_vinop(inode), peer,
42634263
ocap->seq, ocap->mseq, mds,
4264-
le32_to_cpu(ph->seq),
4264+
le32_to_cpu(ph->issue_seq),
42654265
le32_to_cpu(ph->mseq));
42664266
}
42674267
ceph_remove_cap(mdsc, ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE));

include/linux/ceph/ceph_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ struct ceph_mds_caps {
808808

809809
struct ceph_mds_cap_peer {
810810
__le64 cap_id;
811-
__le32 seq;
811+
__le32 issue_seq;
812812
__le32 mseq;
813813
__le32 mds;
814814
__u8 flags;

0 commit comments

Comments
 (0)