Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
186e4f7a
Commit
186e4f7a
authored
Nov 22, 2013
by
Yan, Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: handle session flush message
Signed-off-by:
Yan, Zheng
<
zheng.z.yan@intel.com
>
parent
9215aeea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
fs/ceph/mds_client.c
fs/ceph/mds_client.c
+19
-0
fs/ceph/strings.c
fs/ceph/strings.c
+2
-0
include/linux/ceph/ceph_fs.h
include/linux/ceph/ceph_fs.h
+2
-0
No files found.
fs/ceph/mds_client.c
View file @
186e4f7a
...
@@ -1137,6 +1137,21 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,
...
@@ -1137,6 +1137,21 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,
return
0
;
return
0
;
}
}
static
int
send_flushmsg_ack
(
struct
ceph_mds_client
*
mdsc
,
struct
ceph_mds_session
*
session
,
u64
seq
)
{
struct
ceph_msg
*
msg
;
dout
(
"send_flushmsg_ack to mds%d (%s)s seq %lld
\n
"
,
session
->
s_mds
,
session_state_name
(
session
->
s_state
),
seq
);
msg
=
create_session_msg
(
CEPH_SESSION_FLUSHMSG_ACK
,
seq
);
if
(
!
msg
)
return
-
ENOMEM
;
ceph_con_send
(
&
session
->
s_con
,
msg
);
return
0
;
}
/*
/*
* Note new cap ttl, and any transition from stale -> not stale (fresh?).
* Note new cap ttl, and any transition from stale -> not stale (fresh?).
*
*
...
@@ -2396,6 +2411,10 @@ static void handle_session(struct ceph_mds_session *session,
...
@@ -2396,6 +2411,10 @@ static void handle_session(struct ceph_mds_session *session,
trim_caps
(
mdsc
,
session
,
le32_to_cpu
(
h
->
max_caps
));
trim_caps
(
mdsc
,
session
,
le32_to_cpu
(
h
->
max_caps
));
break
;
break
;
case
CEPH_SESSION_FLUSHMSG
:
send_flushmsg_ack
(
mdsc
,
session
,
seq
);
break
;
default:
default:
pr_err
(
"mdsc_handle_session bad op %d mds%d
\n
"
,
op
,
mds
);
pr_err
(
"mdsc_handle_session bad op %d mds%d
\n
"
,
op
,
mds
);
WARN_ON
(
1
);
WARN_ON
(
1
);
...
...
fs/ceph/strings.c
View file @
186e4f7a
...
@@ -41,6 +41,8 @@ const char *ceph_session_op_name(int op)
...
@@ -41,6 +41,8 @@ const char *ceph_session_op_name(int op)
case
CEPH_SESSION_RENEWCAPS
:
return
"renewcaps"
;
case
CEPH_SESSION_RENEWCAPS
:
return
"renewcaps"
;
case
CEPH_SESSION_STALE
:
return
"stale"
;
case
CEPH_SESSION_STALE
:
return
"stale"
;
case
CEPH_SESSION_RECALL_STATE
:
return
"recall_state"
;
case
CEPH_SESSION_RECALL_STATE
:
return
"recall_state"
;
case
CEPH_SESSION_FLUSHMSG
:
return
"flushmsg"
;
case
CEPH_SESSION_FLUSHMSG_ACK
:
return
"flushmsg_ack"
;
}
}
return
"???"
;
return
"???"
;
}
}
...
...
include/linux/ceph/ceph_fs.h
View file @
186e4f7a
...
@@ -282,6 +282,8 @@ enum {
...
@@ -282,6 +282,8 @@ enum {
CEPH_SESSION_RENEWCAPS
,
CEPH_SESSION_RENEWCAPS
,
CEPH_SESSION_STALE
,
CEPH_SESSION_STALE
,
CEPH_SESSION_RECALL_STATE
,
CEPH_SESSION_RECALL_STATE
,
CEPH_SESSION_FLUSHMSG
,
CEPH_SESSION_FLUSHMSG_ACK
,
};
};
extern
const
char
*
ceph_session_op_name
(
int
op
);
extern
const
char
*
ceph_session_op_name
(
int
op
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment