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
6822d00b
Commit
6822d00b
authored
Apr 07, 2010
by
Sage Weil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: wait for both monmap and osdmap when opening session
Signed-off-by:
Yehuda Sadeh
<
yehuda@hq.newdream.net
>
parent
6f2bc3ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
fs/ceph/super.c
fs/ceph/super.c
+6
-5
No files found.
fs/ceph/super.c
View file @
6822d00b
...
@@ -682,9 +682,10 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid)
...
@@ -682,9 +682,10 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid)
/*
/*
* true if we have the mon map (and have thus joined the cluster)
* true if we have the mon map (and have thus joined the cluster)
*/
*/
static
int
have_mon_map
(
struct
ceph_client
*
client
)
static
int
have_mon_
and_osd_
map
(
struct
ceph_client
*
client
)
{
{
return
client
->
monc
.
monmap
&&
client
->
monc
.
monmap
->
epoch
;
return
client
->
monc
.
monmap
&&
client
->
monc
.
monmap
->
epoch
&&
client
->
osdc
.
osdmap
&&
client
->
osdc
.
osdmap
->
epoch
;
}
}
/*
/*
...
@@ -762,7 +763,7 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
...
@@ -762,7 +763,7 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
if
(
err
<
0
)
if
(
err
<
0
)
goto
out
;
goto
out
;
while
(
!
have_mon_map
(
client
))
{
while
(
!
have_mon_
and_osd_
map
(
client
))
{
err
=
-
EIO
;
err
=
-
EIO
;
if
(
timeout
&&
time_after_eq
(
jiffies
,
started
+
timeout
))
if
(
timeout
&&
time_after_eq
(
jiffies
,
started
+
timeout
))
goto
out
;
goto
out
;
...
@@ -770,8 +771,8 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
...
@@ -770,8 +771,8 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
/* wait */
/* wait */
dout
(
"mount waiting for mon_map
\n
"
);
dout
(
"mount waiting for mon_map
\n
"
);
err
=
wait_event_interruptible_timeout
(
client
->
auth_wq
,
err
=
wait_event_interruptible_timeout
(
client
->
auth_wq
,
have_mon
_map
(
client
)
||
(
client
->
auth_err
<
0
),
have_mon_and_osd
_map
(
client
)
||
(
client
->
auth_err
<
0
),
timeout
);
timeout
);
if
(
err
==
-
EINTR
||
err
==
-
ERESTARTSYS
)
if
(
err
==
-
EINTR
||
err
==
-
ERESTARTSYS
)
goto
out
;
goto
out
;
if
(
client
->
auth_err
<
0
)
{
if
(
client
->
auth_err
<
0
)
{
...
...
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